Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-12-09 04:55:09


Okay, I've nearly done with the <link> feauture and
associated support for -l libraries. I do have a couple
of questions for gcc gurus.

1. If I have two libraries, "a", and "b", and want to link
the first one statically, and the second one dynamically,
what should command line contain.
If I try

-Wl,-Bdynamic -la -Wl,-Bstatic -lb

then it works on certain system. On another, this links
both libraries statically, and I need

-Wl,-Bdynamic -Wl,-la -Wl,-Bstatic -Wl,-lb

So, what's the rigt way?

2. Is it ever possible to link to static runtime if any lib
is dynamic? For example, in default setting both "-lm" and "-lc"
are linked dynamically. If I say

-Wl,-Bdynamic -lz -Wl,Bstatic

(here, the last element should affect runtime libs).

Then, -lz is linked dynamically (that's right),
"-lm" is linked statically (that's right, too), but
"-lc" is linked dynamically (althought it's part of C runtime).
I guess that's because "-lz" uses dynamic runtime.

What to do about that? I'm inclined to do nothing.

3. I recall that somebody posted a table with various linker options
for shared/static libraries a long time ago. Of course, I did not
save that message, don't remember who's the author, and even
don't remember which ml (boost or jamboost) that was on. No luck
with searching. Has anybody a brigher memory?

- 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