469,890 Members | 2,164 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,890 developers. It's quick & easy.

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

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

return 0;
}
Jun 27 '08 #1
1 1679
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
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Bren | last post: by
reply views Thread by Natsu Mizutani | last post: by
reply views Thread by Li Daobing | last post: by
3 posts views Thread by MakaMaka | last post: by
4 posts views Thread by Shawn McGrath | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.