Boost logo

Boost-Build :

From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2007-08-16 06:30:38


Vladimir Prus wrote:

> You mean this part:
>
> if $(type) = SEARCHED_LIB &&
> ( [ $(property-set).get <link> ] in static ) &&
> ( [ $(property-set).get <target-os> ] in windows )
> {
> name = lib$(name) ;
> }
>
> I'm not sure I get the point, can you explain?

Since the 'lib' prefix is not used in general, as already mentioned, there has
to be something that will take care of windows static libraries.

As I can see the import libs for dll's don't have 'lib' prefix.
But the static libs do have. Consequently there needs to be a mechanism that
adds the 'lib' prefix on windows. The above code will do just that.
It is a necessary consequence of generally turning off 'lib' prefix for searched
libs.

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".

Roland


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