Boost logo

Boost-Build :

Subject: [Boost-build] Build error when adding Boost libraries to own projects
From: Norbert Wenzel (norbert.wenzel.lists_at_[hidden])
Date: 2012-07-30 03:50:55


Hello,

i have the following setup in my project an in a simple test setup. I
have one library that uses (amongst others) Boost Filesystem and
provides the basic functionality to my project.
I have multiple small executables that use my library and Boost Chrono
to get some timing information.

Both have really simple Jamfiles that use the Jamfiles provided in the
Boost 1.50 distribution for building Boost libraries.

(I can provide my test setup if needed but these are really simple
Jamfiles more or less copied from the tutorial pages. My library builds
fine, since all boost libraries are created and linked only once in this
project, so I dont' expect this to be an error in my Jamfiles.)

The problem with this setup seems to be that both, Filesystem and Chrono
use the Boost System library but with different settings, which causes
the build to fail with the following error message:

error: Duplicate name of actual target:
<p/programming/external/boost/bin.v2/libs/system/build/gcc-4.6.1/debug>libboost_system.so.1.50.0
error: previous virtual target {
gcc%gcc.link.dll-libboost_system.so.1.50.0.SHARED_LIB {
gcc%gcc.compile.c++-error_code.o.OBJ { error_code.cpp.CPP } } }
error: created from
/programming/external/boost/libs/system/build/boost_system
error: another virtual target {
gcc%gcc.link.dll-libboost_system.so.1.50.0.SHARED_LIB {
gcc%gcc.compile.c++-error_code.o.OBJ { error_code.cpp.CPP } } }
error: created from
/programming/external/boost/libs/system/build/boost_system
error: added properties: <warnings>on
error: removed properties: <preserve-test-targets>on
<python-debugging>off <python.interpreter>python <python>2.7
<threadapi>pthread <warnings>all

I've found the FAQ entry to this error message which tells me to
prebuild the Boost library and link the binaries instead of the projects
Jamfiles.

I just wanted to ask if this is intentended behaviour that I can not use
the Jamfiles delivered with the Boost distribution. Also I wanted to
know if there is any other solution than prebuilding all required Boost
libraries and linking them with the appropriate filename.

thanks,
Norbert


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk