Boost logo

Boost-Build :

From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2007-11-08 10:36:34

On Nov 8, 2007 1:12 PM, Vladimir Prus <ghost_at_[hidden]> wrote:


> Can you:
> 1. Provide a couple of cases where the behaviour you ask for would
> be helpful for you -- I mean exact settings specified on command line
> and in Jamfile.
> 2. Tell what you expect in this situation:
> exe a : a.cpp helper : <link>static ;
> lib helper : helper.cpp : <link>shared ;
> Those are not rhetoric questions -- I'd need better understanding of use
> cases where the current behaviour confuses you.

I expect exe to be linked statically, but helper to be linked shared.
So 'a' uses 'helper' as a shared library.
My problem is this:

exe a : a.cpp helper1 helper2 : <link>static ;
lib helper1 : helper1.cpp ;
lib helper2 : helper2.cpp helper1 : <link>shared ;

When building 'a', I expect helper1 to be built only as shared. 'a'
statically and helper2 shared.
But what really happens is that helper2 is both compiled statically
*and* shared. Which leads to problems when singletons are used in
helper1 library.
helper1 creates more than one singleton, at least in win32 DLL's
versus static library.

> - Volodya


Felipe Magno de Almeida

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