[C++-sig] Problems building boost.python with python-debugging
David Abrahams
dave at boost-consulting.com
Tue Sep 4 19:05:57 CEST 2007
on Tue Sep 04 2007, Roberto Delfiore <roberto.delfiore-AT-srlabs.it> wrote:
> I'm developing a C++ Windows Application using VC++ 2005, I need to have
> a version of boost.python that uses only debug runtime environment.
> Python25.dll needs msvcrt.dll release runtime environment.
> Being a big project, in debug build I've problems mixing debug and
> release dlls runtime environments.
>
> - I've rebuild python in debug (python_d) using Visual Studio.
>
> - I've created "user-config.jam" file in my home dir, the file content is:
> using python : 2.5 : F:\\src\\custom_python-vc80-2_5
> : # includes
> : # libs
> : <python-debugging>on ;
>
> - I've rebuild boost-python using bjam toolset=msvc --debug-configuration
> This generates a link error:
> "undefined symbol Py_InitModule4"
That's because you didn't turn python-debugging on for that build.
Try
bjam toolset=msvc python-debugging=on --debug-configuration
> In python 2.5 sources Include/modsupport.h
> - I've commented out:
> #define Py_InitModule4 Py_InitModule4TraceRefs
Whoa, never modify the Python sources.
> Why boost.python build doesn't know that using "python debugging",
> Py_InitModule4 is renamed????
>
> - I've rebuild boost-python
> Linking OK!!
You broke modsupport.h, and you shouldn't expect anything to work from
here on, even if linking succeeds.
--
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com
The Astoria Seminar ==> http://www.astoriaseminar.com
More information about the Cplusplus-sig
mailing list