Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-02-06 17:21:44

----- Original Message -----
From: "sfranke2000" <franke_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, February 06, 2002 2:53 PM
Subject: [boost] Hopelessly stuck with Boost.Python again

> After having managed to build Boost.Python along with its
> test projects, I'm now trying to use it in my project
> (large app in PC/Win2k/MSVC6).
> I thought it would be as simple as linking libboost_python_static.lib
> (prebuilt using jam) to it and include the necessary headers.
> Unfortunately not. I'm building libboost_python_static.lib using
> BOOST_DEBUG_PYTHON, since I have a debug version of Python.

I've built and tested every version of Boost.Python in your environment,
using the debug version of Python, but now that Boost.Python supports a
dynamic library (libboost_python.lib/.dll) I have stopped testing the static
version. There's really no reason to use libboost_python_static anyway; it
just makes all of your extension modules huge. Perhaps inadvisedly, I've
left it in the Jamfile as a courtesy in case someone thought they needed a
static lib for some important reason.

> I get a number of unresolved externals during linking from
> conversions.obj and types.obj (see below). What's missing here?

The presence of many instances of "__declspec(dllimport)" in your link
errors tell me that your application is expecting to find definitions from
the DLL version of the library (supplied by its import library,
libboost_python.lib). So it's not surprising that if you're linking to
libboost_python_static.lib you'd be getting lots of link errors.

FWIW I just built and tested the current CVS state again and it still works
for me.

> I don't get these errors if I leave out BOOST_DEBUG_PYTHON, but then
> the non-debug Python links to msvcrt.dll and the rest of the program
> to msvcrtd.dll which leads to a crash somewhere in Python.
> BTW I tried also to include the bpl_static DevStudio project in my
> workspace, adjust all paths, and use its output lib instead of the
> one build with jam -- same result.
> So I have to ask again: Is anyone successfully using Boost.Python in
> my environment? Maybe you can send me your .dsp file in case you made
> one yourself.
> I would even happily use a somewhat older version of Boost.Python if
> it would only run (right now I have the latest CVS)! This is the
> third day I'm struggling with it now and apart from the fact that I'm
> slowly despairing my bosses little by little start to put me under
> pressure.

Don't give up hope; I think you're quite close.


Boost list run by bdawes at, gregod at, cpdaniel at, john at