Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-12-06 05:56:37


Markus Schöpflin wrote:
> "David Abrahams" <dave_at_[hidden]> wrote in message
> news:uy9741f9s.fsf_at_boost-consulting.com...
>
>
>> lib a : a.cpp cool_lib/<shared>false : <shared>true
>
> <runtime-link>static ;
>
> Let me try to rephrase this in plain words. Just tell me if I get it right.
>
> You want to build a dynamic library (<shared>true) that uses the static
> runtime model. And it links to cool_lib as a static library. Did I get this
> right?

Yes, that's what I meant.

> That leaves several questions:
>
> 1. How would I select the runtime model of cool_lib? Does is use the same as
> lib a?

Yes.

> 2. I'm assuming that you would get a static library a when you change
> <shared>true to <shared>false. Is that correct?

Yes.

>
> 3. If yes, what would I get if I don't say static or dynamic at all?

There's default value of <shared> feature. It can be also affected by
dependents. For example:

stage static-stage : a : <shared>false ;
stage shared-stage : a : <shared>true ;

If you build "static-stage", then "a" will use static linking.

>
> 4. Is it really a good decision to drop the distinction between lib and dll?

I can't say, in general. From my point of view --- yes. I never understood
why I should declare two target to achive the same goal -- building a library.
Linux users are assustomed to easy switching static and dynamic linking.
If you have "lib" and "dll", you'll either build them all (and that seems
unnecessary), or you have introduce features that control if either one
should be build --- i.e. you're back to "shared".

- 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