problem boost::python::import

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?ISO-8859-1?Q?Fr=E9d=E9ric_Degraeve?=

    problem boost::python::import

    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_Import Module("sys"); // works

    boost::python:: object sys = boost::python:: import("sys"); // doesnt
    work

    return 0;
    }
  • brad

    #2
    Re: problem boost::python:: import

    Frédéric Degraeve wrote:
    Hello,
    >
    I tried this code with vs7-8 and boost1.34.1-1.35.0 and my python is a
    2.4......
    Try the boost users list:

    To subscribe or unsubscribe via the World Wide Web, visit


    Comment

    Working...