Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-10-16 08:14:59


Alkis Evlogimenos <alkis_at_[hidden]> writes:

> On Tuesday 15 October 2002 03:11 pm, David Abrahams wrote:
> > Yes, it does. That's what -static in the g++ command-line means. You
> > can inspect the build command lines by passing
> >
> > -n -a
> >
> > to bjam when you invoke it. Inspecting the differences will tell you a
> > lot.
>
> After some recompilations and google digging through the net let me try and
> see if I got this right:
>
> shared-linkable-true: creates targets that can be linked in a shared object
> (all it says is that the code generated is position independent;

It may mean something else on non-ELF platforms, but that's the right
idea.

> if that goes
> to a static/shared library or a statically/dynamically linked executable is
> another story) (passes -fPIC to gcc)
>
> runtime-link-dynamic: creates targets that are dynamically linked to the C++
> runtime (no additional options for gcc)
>
> runtime-link-static: creates targets that are statically linked to the C++
> runtime (passes -static to gcc)
>
> If the above is correct then shouldn't runtime-link-dynamic and
> runtime-link-static be passing to gcc "-shared-libgcc" and "-static-libgcc"
> respectively? gcc's manual says that "-static" turns on preference to static
> libraries in general whereas "-{static,dynamic}-libgcc" only affects libgcc
> (isn't this the C++ Runtime?).

Well, I guess that's right.

> Anyway, when building boost I can't seem to be able to get shared libraries
> for anything other than boost_regex and boost_signals.

Boost.Python builds a shared library by default.

> Is it a bad idea to link dynamically to boost_thread and
> boost_date_time libraries? Or there is nothing wrong with it and all
> I have to do is add a dll rule for each of them?

I don't know about that; I'll let the individual library authors
answer you.

-- 
           David Abrahams * Boost Consulting
dave_at_[hidden] * http://www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk