Problem w/ boost_python_debug.dll
david.abrahams at rcn.com
Sat Sep 28 01:08:20 CEST 2002
[Boost.Python questions should go to the C++-sig
(http://www.python.org/sigs/c++-sig/); I seldom watch this list carefully.]
This is a limitation of our build system (sorry, we're working on it).
boost_python_pydebug.lib is really built as boost_python.lib, then
copied/renamed, a strategy that doesn't work out well. You have several
1. rename the debug products back to boost_python.lib/.dll, and link
with that. Keep debug and release versions in separate directories. Keep
your PATH straight so that the wrong one is never loaded by mistake
2. Use Boost.Build to build your project. It always keeps the
debug/release/debug-python versions in separate directories, and
automatically points at the right one (which is why this doesn't cause me
all kinds of pain every day).
3. Temporarily edit libs/python/build/Jamfile to change the name of the
library target from boost_python to boost_python_pydebug. Rebuild
everything. There will be a properly-named-and-functioning debug library in
the bin/ directory tree. Grab it and away you go.
Sorry for the inconvenience. I'm going to try to get distutils going for v2;
that should make some of these things easier.
David Abrahams * Boost Consulting
dave at boost-consulting.com * http://www.boost-consulting.com
"Richard" <kapis at hotmail.com> wrote in message
news:cb95025b.0209142123.82c016e at posting.google.com...
> I'm using Boost.Python (v1) to embed & extend a C++ application. I've
> downloaded ActiveState's distribution and built the debug python
> library and DLL.
> I built the release and python-debug versions of Boost.Python as is
> documented. I also define BOOST_DEBUG_PYTHON in my C++ files since I
> have the debug python libraries.
> Enough with the background, let's get to the problem. For debug
> builds, I link with boost_python_pydebug.lib. But when I run the
> program, it still tries to load up boost_python.dll, NOT the debug
> version! The only way I know to fix the problem is to rename
> boost_python_pydebug.dll so that it is loaded instead.
> Does anyone know a better fix? Any help would be appreciated.
More information about the Python-list