|
Boost Users : |
From: hh10k (kurt_at_[hidden])
Date: 2003-07-18 05:27:48
I've compiled STLport for vc6, and can compile Boost with this:
bjam "-sTOOLS=msvc-stlport" "-sBUILD=debug <stlport-iostream>on"
So far so good, but when I try to compile a simple Boost.Python
example (why I got Boost) I get a heap of link errors because Boost
has linked with the DLL version of STLport, and I want it statically
linked. I thought it's meant to default to static, but I can only
guess that STLport is detecting otherwise.
So, in order to force Boost to use the static verion, I tried:
bjam "-sTOOLS=msvc-stlport" "-sBUILD=debug <stlport-iostream>on
<define>_STLP_USE_STATIC_LIB"
But now I get errors like:
vc-Link
libs\python\build\bin\boost_python.dll\msvc-stlport\debug\runtime-link-dynamic\stlport-cstd-namespace-std\stlport-iostream-on\stlport-version-4.5.3\boost_python_debug.dll
libs\python\build\bin\boost_python.dll\msvc-stlport\debug\runtime-link-dynamic\stlport-cstd-namespace-std\stlport-iostream-on\stlport-version-4.5.3\boost_python_debug.lib
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall
std::bad_alloc::bad_alloc(char const *)" (??0bad_alloc_at_std@@QAE_at_PBD@Z)
already defined in stlport_vc6_stldebug_static.lib(dll_main.obj)
LIBCMTD.lib(osfinfo.obj) : error LNK2005: __get_osfhandle already
defined in MSVCRTD.lib(MSVCRTD.dll)
LIBCMTD.lib(dbgheap.obj) : error LNK2005: _malloc already defined in
MSVCRTD.lib(MSVCRTD.dll)
...lots more errors...
This isn't just a problem with Boost.Python. Anything else that
builds a dll or exe has the same errors. The first error seems really
strange, because I can't understand how std::bad_alloc should exist in
stlport_vc6_stldebug_static.lib(dll_main.obj). STLport does define
it's own bad_alloc, but it also #defines std to _STL so there should
be no 'std'. When I use bad_alloc in my own programs I don't have any
problems, so I can only assume it's Boost.
I've wasted so much time trying to work this out, but I don't know
much about the Boost build process. What's going wrong?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net