Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2003-02-28 14:29:30


"klapshin <klapshin_at_[hidden]>" <klapshin_at_[hidden]> writes:

> --- In jamboost_at_[hidden], Vladimir Prus <ghost_at_c...> wrote:
>> Regarding the other issue, linking a library into a library, I'll
>> have to do some more research. In particular:
>> 1. Is it possible to link two static libraries together with GNU ar
>
> Can't tell from a top of my head, but my understanding that you can
> not do that. You should be able to extract object files from two
> libraries and assemble a new one, but I guess it is not what you are
> asking.

My quick tests show that you can stick anything you want in a Linux
archive, but the linker won't find any symbols unless the component files are
.o files. In other words, the .a wrapper of the contained files
hides the symbols from the linker.... i.e., you can't do that.

>> 2. Is there are way to link shared library into static one (seems
>> impossible to me).
>
> I would be surprised if you can do this.

> AFAIK, static library should not be linked with anything, all the
> symbol resolution happens when you link executable or dll.
>
> The problem here is that dll, from linker point of view, much closer
> to exe then to static library. However boost.builds has a generic
> rule lib which is supposed to handle both.

That's not a problem, fortunately. Boost.Build is a lot smarter
under the covers than that single rule "lib" might make it appear to
be ;-)

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com
 

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