problem boost::python::import
Frédéric Degraeve
frederic.degraeve at gmail.com
Thu May 22 09:18:20 EDT 2008
Hello,
I tried this code with vs7-8 and boost1.34.1-1.35.0 and my python is a
2.4. The call to Cpython works well but boost::python doesn't work.
I've got an exception about an access violation reading location
0x00000000.
help, please?
thank you.
Frédéric
#include "stdafx.h"
#include <boost/python.hpp>
#include <iostream>
#include <stdexcept>
#include <cassert>
using namespace boost::python;
int _tmain(int argc, _TCHAR* argv[])
{
Py_Initialize();
PyObject* pSys = PyImport_ImportModule("sys"); // works
boost::python::object sys = boost::python::import("sys"); // doesnt
work
return 0;
}
More information about the Python-list
mailing list