[C++-sig] Re: using BOOST_PYTHON_STATIC_LIB

David Abrahams dave at boost-consulting.com
Tue May 27 18:45:23 CEST 2003


Rene Rivera <grafik666 at redshift-software.com> writes:

> [2003-05-27] David Abrahams wrote:
>
>>"Achim Domma \(ProCoders\)" <domma at procoders.net> writes:
>>
>>> Hello,
>>>
>>> is it still possible to use boost_python as static library? In config.hpp
> I
>>> found BOOST_PYTHON_STATIC_LIB, but it seems not to be mentioned anywhere
> in
>>> the documentation. I defined it like this in my Jamfile:
>>>
>>> <vc7><*><define>BOOST_PYTHON_STATIC_LIB
>>>
>>> Bjam is linking with libboost_python.lib then, but I get a lot of
> unresolved
>>> externals, all refering to boost.python functions using
>>> __declspec(dllimport) which seems wrong to me. Is it my fault or do I
> have
>>> to use the shared library?
>>
>>You shouldn't have to use the shared library.  Oops, as far as I can
>>tell, if you're trying to use boost_python.lib from the bin-stage
>>directory, we have a problem: the import library for the Boost.Python
>>DLL has the same name, and overwrites the static library.  For the
>>time being, until we figure out how to fix this, you should dig into
>>the bin/... directories to find the static library build.
>>
>>Rene, do you have a solution up your sleeve for this one?
>
> No trick solution needed. It should be putting the static lib to the
> stage-bin with the "libboost_python.lib" name. At least that's what it looks
> it does when I run the bjam in the libs/python/build directory. And from the
> above message it looks like Achim is using that version of the lib.

And how would that name differ from the name of the import library
used for libboost_python.dll?


-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com





More information about the Cplusplus-sig mailing list