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


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:
error: previous virtual target { {
gcc%gcc.compile.c++-error_code.o.OBJ { error_code.cpp.CPP } } }
error: created from
error: another virtual target { {
gcc%gcc.compile.c++-error_code.o.OBJ { error_code.cpp.CPP } } }
error: created from
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

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.


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at