By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,002 Members | 1,020 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,002 IT Pros & Developers. It's quick & easy.

problem boost::python::import

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.