problem boost::python::import

  • Thread starter Frédéric Degraeve
  • Start date
F

Frédéric Degraeve

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::eek:bject sys = boost::python::import("sys"); // doesnt
work

return 0;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top