Boost logo

Boost-Build :

From: Phillip Seaver (phil_at_[hidden])
Date: 2007-08-16 09:24:38


Roland Schwarz wrote:
> Btw.: I am wondering how the static linking issue is been addressed by
> Boost.Build on *nix. AFAIK as long as there are both static _and_ so libs are
> in the search path, the -l switch will favour the so variant. So I suspect that
> the feature <link>static will give the expected behaviour on these platforms.
> They cannot be simply passed to the -l switch.
>
> AFAIK it would be necessary to explicitely link to the static variant in this
> case by adding them to the linker input. But I might be totally wrong, in which
> case I would be glad to learn the "correct way".

As I said in an earlier email, the gcc toolset (and msvc, for that
matter) puts the paths to the static libraries on the link line instead
of using the "-l" option
("../../bin/gcc/release/link-static/mylib.a" instead of
"-L../../bin/gcc/release/link-static -lmylib", e.g.).

Phillip


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