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: Robert Boehne
Subject: Re: Add a static library to a shared library
Date: Thu, 06 Sep 2001 15:34:42 -0500

In general you can't because shared libraries must be
PIC, while static libraries aren't necessarily PIC.

"Jens Krüger" 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
> 
> --
> Jens Kruger
> 
> Technische Universitat Munchen
> ZBE FRM-II
> Lichtenberg-Str. 1
> D-85747 Garching
> 
> Tel: + 49 89 289 14 716
> Fax: + 49 89 289 14 666
> mailto:address@hidden
> http://www.frm2.tu-muenchen.de
> 
> _______________________________________________
> Libtool mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/libtool

-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  address@hidden



reply via email to

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