[C++-sig] [boost.python] Debug build on win32 runtime trouble

Olaf Peter ope-devel at gmx.de
Sat Sep 20 19:50:22 CEST 2008


Thomas Berg schrieb:
> On Fri, Sep 19, 2008 at 7:21 AM, Olaf Peter <ope-devel at gmx.de> wrote:
>> As first thank you for the answer. Anyway, I assume the debug build of
>> boost_python dll ist wrong and points to the wrong python25.dll, should be
>> python25_d.dll. Could it be? I've used the boostpro windows installer
>> 1.35.0.
>>
>> Thanks,
>> Olaf
>>
>> PS: My code works without defined BOOST_DEBUG_PYTHON; my crash results
>> really from different memory layout of the python25{_d}.dll used by
>> BOOST_PYTHON-VC80-MT-GD-1_35.DLL.
> 
> 
> Sorry Olaf, I assumed that you had built boost yourself, as I always
> do... As David says this is the intentional default debug variant of
> boost python. I don't know if the boostpro installer is capable of
> installing the proper python-debug versions of the libraries. If not,
> I guess you will have to build it yourself with bjam, passing
> python-debugging=on. Notice that you get a different name: "gyd"
> instead of "gd" in the lib / dll name.
> 
> Believe me, you do want to define BOOST_DEBUG_PYTHON when building
> your application, otherwise one of the boost python headers will
> undefine _DEBUG before including "python.h". See
> boost/python/detail/wrap_python.hpp, or the documentation. It might
> accidentaly work if you "illegaly" include python.h yourself.
> 
> You may also want to disable the autolinking of boost, since it
> doesn't handle the python debug naming scheme (at least in earlier
> versions of boost it doesn't), and pulls in the wrong library. Do that
> by defining BOOST_ALL_NO_LIB in your project.

Thanks for your explanation and patience.

Regards,
Olaf



More information about the Cplusplus-sig mailing list