On 2018-12-19 22:05, Steven Watanabe via Boost-build wrote:

Boost.Build works the other way around.
That is, <link>shared propagates from the
executable to the library, not from the
library to the executable.  The only way
to link to both a static and a shared library
is if one of the libraries explicitly overrides
the value of <link> that it receives.


lib static : static.cpp : <link>static ;
lib shared : shared.cpp : <link>shared ;
exe main : main.cpp static shared ;

$ b2 link=static # builds link-static/main.o
$ b2 link=shared # builds link-shared/main.o

Ah, so had the two libraries `static` and `shared` not explicit `link` properties, they would both be compiled as `shared` and `static` libs respectively in the two invocations ?



      ...ich hab' noch einen Koffer in Berlin...