Boost logo

Boost-Build :

Subject: [Boost-build] [boost-build] link=shared with msvc does not propagate dependent libraries
From: Richard G G (glanmark_at_[hidden])
Date: 2010-05-10 04:56:02

Compiling my project with bjam on Windows/msvc toolset works fine as long as
use static linking like:

> bjam link=static

However, invoking bjam with link=shared, I get undefined symbols.

It seems as if dependent libraries are not propagated with shared linking,
but with static linking!?

Basically I have the following:

   | Jamroot
   +-- dirA
   | Jamfile
   +-- dirB
         | Jamfile
         +-- test

 use-project /boost : {path-to-boost-installation} ;


  lib a : sourceA.cpp ;


  project B : <library>/dirA//a
  lib b : sourceB.cpp ;


  project BTest : <library>/dirB//b ;

  unit-test testB : sourceBTest.cpp ;

When compiling the unit test with link=static, everything works fine. But
with link=shared, I get undefined symbols from lib a. When analyzing the
boost build with -d2, static linking propagates its dependent libraries,
i.e. library a is present when linking the unit test. But its not propagated
with link=shared.


Adding library a explicitly in the requirements for project BTest will make
it work with link=shared. But isn't this unnecessary and the point of
propagating dependent libraries?



View this message in context:
Sent from the Boost - Build mailing list archive at

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