Boost logo

Boost Users :

From: Ben Hutchings (yg-boost-users_at_[hidden])
Date: 2003-03-26 10:38:56


In article <23681.5566233874$1028263753_at_[hidden]>,
Srivatsan Raghavan wrote:
> hi all ,
> i created a c++ extension module using python which worked fine..
>
> then i wanted to embed a call to PyRun_SimpleFile in another app,
> and the script i was calling is attempting to use my extension module
>
> but i was getting telling me that the interpreter wasn't initialized
> after much searching, research, and work with msvc's Dependency Walker
> i narrowed it down to the fact that boost_python_debug.dll is trying to
> link to the release version of python22.dll , whereas it should be
> linking to python22_d.dll (which unfortunately does not come with the
> python installer , that has to be compiled manually )
>
> at any rate, how can the boost::python Jamfile be modified to try this
> check when it comes boost::python ?

This is correct. The 'debug' configuration is meant to work with a
release version of Python, though I don't know why. However, there is
no need to modify the Jamfile; just use the 'debug-python' configuration
instead. Also, make sure you include <pyconfig.h> before any of the
Boost.Python headers, because not all of them do that and you can end
up with incorrect structure definitions in a debug build if you don't.
(I should report this bug.)


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