[C++-sig] Building Boost.Python against a debug build of Python

Jim Bosch talljimbo at gmail.com
Fri Feb 17 23:15:19 CET 2012

If you haven't already, you may need to take this to a Boost.Build list; 
I avoid Boost's build system whenever possible, and I know even less 
about using it on Windows.



On 02/15/2012 10:38 AM, Adam Preble wrote:
> I previously posted about runtime oddness when switching to a debug build
> of python.  I figured I needed to rebuild Boost.Python.  The build process
> is fixated on using the normal python.exe and python.lib paths, rather than
> python_d.exe and python_d.lib.  I have put those files in my Python26
> directory, and then tried to get fancy by renaming them to their release
> names instead.  It gets mad at me . . .
>   Creating library
> bin.v2\libs\python\build\msvc-10.0\release\address-model-32\architecture-x86\debug-store-database\debug-symbols-on\python-debugging-on\threading-multi\boost_python-vc100-mt-y-1_47.lib
> and object
> bin.v2\libs\python\build\msvc-10.0\release\address-model-32\architecture-x86\debug-store-database\debug-symbols-on\python-debugging-on\threading-multi\boost_python-vc100-mt-y-1_47.exp
> module.obj : error LNK2019: unresolved external symbol
> __imp__Py_InitModule4 referenced in function "struct _object * __cdecl
> boost::python::detail::init_module(char const *,void (__cdecl*)(void))"
> (?init_module at detail@python at boost@@YAPAU_object@@PBDP6AXXZ at Z)
> bin.v2\libs\python\build\msvc-10.0\release\address-model-32\architecture-x86\debug-store-database\debug-symbols-on\python-debugging-on\threading-multi\boost_python-vc100-mt-y-1_47.dll
> : fatal error LNK1120: 1 unresolved externals
> I'm thinking that isn't what I'm supposed to do anyways.  Is there
> something I need to do in my build string?  This is how I would do a full
> build.  Note all the baggage I added for building Python:
> [FWIW I'm building Boost 1.47 with VS2010's toolchain]
> set INCLUDE=D:\Python26\include;D:\Python26\include\Stackless
> b2 --toolset=msvc-10.0 --build-type=complete stage
> b2 --toolset=msvc-10.0 --build-type=complete architecture=x86
> address-model=32 stage
> b2 --toolset=msvc-10.0 --with-python --build-type=complete
> --debug-configuration architecture=x86 address-model=32 stage
> debug-symbols=on debug-store=database python-debugging=on
> _______________________________________________
> Cplusplus-sig mailing list
> Cplusplus-sig at python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig

More information about the Cplusplus-sig mailing list