Boost logo

Boost-Build :

From: Frank Birbacher (bloodymir.crap_at_[hidden])
Date: 2008-05-21 05:52:53


Vladimir Prus schrieb:
> I'd suggest this:
> lib common_proper : [ glob *.cpp ] <link>static ;
> alias common : common_proper /boost//filesystem ;

Ok. Nice idea, but I figured it doesn't scale well. Imagine a structre like:

lib Utils ;
lib Common : Utils ;
exe Main : Common Utils ;

If the libraries where build like you suppose, the Common lib will
already include the Utils and MSVC will reject linking of Main.exe due
to duplicate symbols for every external library (like boost.date_time)
of Utils.

Well, to show what I mean exactly I attached two examples. One I
constructed like you suggested which fails to build link=shared on msvc.
The second I constructed like I suggest using "bundle" instead of "lib"
which has smaller/nicer Jamfiles and build on msvc.

As a note: I also tried those examples on linux/gcc-4.1.2 where all of
them work using link=static,shared. I even have tried more examples all
of which failed linking using msvc. The examples experiment with "<use>"
and "<library>", requirements/usage-requirements in the alias rule like
you proposed (thus 4 more examples).


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