libtool
[Top][All Lists]
Advanced

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

Re: Linking a lib with different shared and static names


From: Daniel Herring
Subject: Re: Linking a lib with different shared and static names
Date: Sat, 10 Nov 2007 14:52:41 -0500 (EST)

On Thu, 8 Nov 2007, Peter O'Gorman wrote:
address@hidden wrote:
I'm trying to link to a library that uses different names for the static
and shared versions.

Example: libABC.so and libABCz.a

Can someone suggest a way to express this to libtool?  Just passing -lABC
fails for static links; -lABCz does the wrong thing on dynamic links.

This is something that you will have to deal with in your Makefile or
configure script, either using different rules in the makefile for the
static and dynamic builds, or substituting a different libname at
config.status time depending on the build type.

Thanks for the reply. Unfortunately, it isn't a satisfactory solution; automake+libtool is supposed to shield me from the static/dynamic details... Having separate automake rules kinda defeats that, and what should config.status decide when both build types are desired?

Maybe it would be best for my build system to wrap this library in a fake libABC.la file? Something like
*** ABC.la
library_names='libABC.so'
old_library='libABCz.a'
installed=yes
libdir='/path/to/install'
***


It would be nice if there was a way to invoke libtool to create such a stub for preinstalled (and non-libtoolized) libraries.

- Daniel




reply via email to

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