Boost logo

Boost-Build :

Subject: [Boost-build] <link>static is ignored
From: Ian Emmons (iemmons_at_[hidden])
Date: 2009-05-11 14:07:45


I am attempting to control whether my program links to the static or
shared versions of various Boost libraries, without success. Here is
the (simplified) Jamroot of my project:

exe foo
        : [ glob *.cpp ]
                /site-config//BoostSystem/<link>static
        : <include>.
        ;

In my site-config.jam file, I have this:

searched-lib BoostSystem
        : # no sources
        : <variant>debug:<name>boost_system-xgcc40-mt-d
                <variant>release:<name>boost_system-xgcc40-mt
                <search>$(BoostDir)/darwin/stage/lib
        : # no default build
        : <include>$(BoostDir)
        ;

I have built both static and shared versions of Boost.System, and they
both reside in the same directory, "$(BoostDir)/darwin/stage/lib". In
spite of the "<link>static" qualifier in my Jamroot, my foo executable
links to the shared version of Boost.System. Why is that?

I am using the version of Boost.Build that ships with Boost 1.38.0 and
bjam 3.1.17 on MacOS (toolset darwin).

Thanks in advance,

Ian


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