Boost logo

Boost Users :

From: Degraeve, Frederic (frederic.degraeve-ext_at_[hidden])
Date: 2008-05-23 06:26:49


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;

}
This message (and any associated files) is intended only for the
use of the individual or entity to which it is addressed and may
contain information that is confidential, subject to copyright or
constitutes a trade secret. If you are not the intended recipient
you are hereby notified that any dissemination, copying or
distribution of this message, or files associated with this message,
is strictly prohibited. If you have received this message in error,
please notify us immediately by replying to the message and deleting
it from your computer. Messages sent to and from us may be monitored.

Internet communications cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed, arrive
late or incomplete, or contain viruses. Therefore, we do not accept
responsibility for any errors or omissions that are present in this
message, or any attachment, that have arisen as a result of e-mail
transmission. If verification is required, please request a hard-copy
version. Any views or opinions presented are solely those of the author
and do not necessarily represent those of the company.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net