automake
[Top][All Lists]
Advanced

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

Re: Add a static library to a shared library


From: Gary V. Vaughan
Subject: Re: Add a static library to a shared library
Date: Thu, 6 Sep 2001 21:44:57 +0100
User-agent: Mutt/1.3.21i

Your Makfile.am fragment looks correct, but you need a newer libtool.
I think 1.4.1 will let you do this (with a warning), but if not then
you will need to use 1.4b.

Cheers,
        Gary.

On Thu, Sep 06, 2001 at 10:36:36AM +0200, Jens Krger wrote:
> Hi,
> 
> How can I add a static library to a shared library.
> I try to build a shared library what should contain a static library.
> 
> Makefile.am:
> 
> libshared_la_LIBADD = -lmystatic
>  
> lib_LTLIBRARIES = libshared.la
> 
> It works fine but a get a warning:
>                  
> *** Warning: This library needs some functionality provided by -lmystatic.
> *** I have the capability to make that library automatically link in when
> *** you link to this library.  But I can only do this if you have a
> *** shared version of the library, which you do not appear to have.
>  
> *** Warning: This library needs some functionality provided by -lmystatic.
> *** I have the capability to make that library automatically link in when
> *** you link to this library.  But I can only do this if you have a
> *** shared version of the library, which you do not appear to have.
> *** The inter-library dependencies that have been dropped here will be
> *** automatically added whenever a program is linked with this library
> *** or is declared to -dlopen it.                                             
>                                                                               
>     
> 
> I think there is no problem if I always use libtool for binding programs. But
> if I try to bind a program without libtool, I think there is a problem, 
> because 
> I have to know what libraries I hat to add to bind. In the shared library is 
> no 
> information (I saw in the gcc call no information like -lmystatic, it seems to
> be removed by libtool), it is only in the libtool library. 
> 
> Thanks
> Jens
-- 
  ())_. Gary V. Vaughan     gary@(oranda.demon.co.uk|gnu.org)
  ( '/  Research Scientist  http://www.oranda.demon.co.uk       ,_())____
  / )=  GNU Hacker          http://www.gnu.org/software/libtool  \'      `&
`(_~)_  Tech' Author        http://sources.redhat.com/autobook   =`---d__/



reply via email to

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