Hi,
I am trying to run the following program:
#include
#include
#include
using namespace boost::python;
using namespace std;
int main(int argc, char** argv) {
{ // Using Python/C
Py_Initialize();
PyObject* main_module = PyImport_ImportModule("__main__");
PyObjec
BTW, this seems specific to 1.38.0 version of Boost - I just
downgraded to 1.34.1 on the same mac, and got the expected "Hello
World from boost::python!".
--Igor.
On Thu, Mar 5, 2009 at 12:47 PM, Igor Karpov wrote:
> Hi,
>
> I am trying to run the following program:
>
> #include
> #include
>
>
>Py_Finalize();
Boost.Python doesn't support Py_Finalize(). Could you try again without?
It is a long-standing known issue, e.g.
http://mail.python.org/pipermail/cplusplus-sig/2005-November/009543.html
___
Cplusplus-sig mailing list
Cplusplus-s
Well, the version with Py_Finalize() runs on the same machine with
1.34.1, so I don't think that's the problem. However, paring down the
code to:
#include
#include
using namespace boost::python;
int main(int argc, char** argv) {
{ // Using boost::python
Py_Initialize();
obj
Sorry I cannot help any further; I've never used embedding myself. I hope
someone
else will step in.
For the archives:
http://www.boost.org/doc/libs/1_38_0/libs/python/todo.html#pyfinalize-safety
I believe you're just getting lucky if Py_Finalize() doesn't crash the process.
- Origina