troy d. straszheim wrote:
Daniel Löb wrote:
Hi!

I seem to be unable to call the constructor of "object" with an integer parameter.
Working example:

#include <boost/python.hpp>
#include <iostream>

using namespace boost::python;
using std::cout;
using std::endl;

int main()
{
    object toast(3);
    cout << extract<int>(toast) << endl;
}

It compiles just fine, but dies with a segmentation fault on execution of the first line within main.


Does calling Py_Initialize() help?

Yes, that did it.

Thank you!

Best regards,
Daniel
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to