[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Including static libraries in shared libraries with libtool.

From: Bob Friesenhahn
Subject: Re: Including static libraries in shared libraries with libtool.
Date: Sun, 26 Sep 2004 19:05:02 -0500 (CDT)

On Mon, 27 Sep 2004, Fredrick Meunier wrote:

Bob Friesenhahn wrote:
Using recent Automake, I find that I am able to eliminate use of convenience libraries by using a non-recursive build and referring to sources in subdirectories. A simple Automake macro refers to all the objects which would be equivalent to a convenience "library". Works great and avoids the overhead imposed by libtool since libtool must extract all the objects from the archive file prior to using them.

This works great as long as you do not have multiple libraries with cross-library dependencies and a binary using those libraries in your single automake project.

This is because automake manages the various inter-library dependencies during building successfully, but then does not handle dependencies at all during installation. As a result you will probably get linker errors on install :(

I agree that Automake has a nasty ordering problem at install time, but the install problem is not at all related to a choice between using convenience libraries or referring to source files in subdirectories. Convenience libraries are never installed.

One thing that convenience libraries do offer is an easy way to tell Automake to use the same compilation options across all objects in the library. It is pretty rare to want some library objects to be built differently than other library objects though.

Bob Friesenhahn

reply via email to

[Prev in Thread] Current Thread [Next in Thread]