|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-10-16 13:12:54
Markus Schöpflin wrote:
> David Abrahams wrote:
>
> ...
> > And given recent discussions on this list about GCC, it might be
> > neccessary to represent "link to this one statically" or "link to
> > this one dynamically", somehow...
> ...
>
> I think this facility is absolutely essential. I usually have the
> requirement to link to all the system libraries dynamically but link
> statically to all the rest. (See our previous discusion here:
> news://news.gmane.org:119/3DA53046.3080004@ginit-technology.com)
For your specific use case, we can have <runtime-link> affect linking of
system libraries, while <shared> will affect user libraries.
lib my : a.cpp ;
exe hello : hello.cpp my : <find-library>pcre ;
Given this Jamfile, you can call
bjam shared=false runtime-link=dynamic
And "pcre" will be dynamically linked, while "my" will be static library.
For a more general case, we might try <find-library-static> and
<find-library-shared>.
Note that for use libraries, you can have this already:
exe hello : hello.cpp my/<shared>false ;
Will cause static linked version of "my" to be used, whatever build
request is.
- Volodya
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