automake
[Top][All Lists]
Advanced

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

Re: Linking lib against static libs using libtool


From: Gary V. Vaughan
Subject: Re: Linking lib against static libs using libtool
Date: Thu, 5 Oct 2000 22:47:40 +0100
User-agent: Mutt/1.2.5i

On Thu, Oct 05, 2000 at 04:58:16PM +0400, Alexander I Olefirenko wrote:
> I'm sorry i've posted same message into this mailing list but don;t get any
> reply.. Hope you'll help me this time :)
> The problem is that i can't link library against static libs:
> here's the code i'm using to link (generated by automake) :
> /bin/sh ../libtool --mode=link c++  -g -O2  -o libocicpp.la -rpath
> /usr/local/lib /usr/local/oracle/app/oracle/product/8.0.5/lib -lclntsh
> -lcommon -lcore4 -lnlsrtl3 -version-info 4:0:4 Connection.lo Cursor.lo Lob.lo
> OraDate.lo OraDummy.lo OraError.lo OraLabel.lo OraLob.lo OraNumber.lo 
> OraRaw.lo
> OraRefCur.lo OraRowID.lo OraString.lo OraType.lo RowID.lo db.lo ocicpp.lo 
> rm -fr .libs/libocicpp.la .libs/libocicpp.* .libs/libocicpp.*
> Here's warning i've got:
> 
> *** Warning: This library needs some functionality provided by -lcommon.
> *** 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 -lcore4.
> *** 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 -lnlsrtl3.
> *** 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.
> gcc -shared  Connection.lo Cursor.lo Lob.lo OraDate.lo OraDummy.lo 
> OraError.lo OraLabel.lo OraLob.lo 
> OraNumber.lo OraRaw.lo OraRefCur.lo OraRowID.lo OraString.lo OraType.lo
> RowID.lo db.lo ocicpp.lo  -L/usr/local/oracle/app/oracle/product/8.0.5/lib
> -lclntsh -lc  -Wl,-soname -Wl,libocicpp.so.0 -o .libs/libocicpp.so.0.4.0
> As you can see common core4 and nlsrt3 are gone ...
> how can i force libtool to add it to gcc's command line.

When you link an application with your libocicpp.la with libtool later
in the build process, it will automatically add -lcore4 and -lnlsrt3
to the link line.

Alternatively you can arrange for shared version of these libraries to
be available at the time you ask libtool to make your library depend
on them.  Many hosts do not allow a shared library to depend on a
static library, which is why you see the warnings above.

> And sorry for my ugly english :)

=)O|

Cheers,
        Gary.
-- 
  ___              _   ___   __              _         mailto: address@hidden
 / __|__ _ _ ___ _| | / / | / /_ _ _  _ __ _| |_  __ _ ___       address@hidden 
| (_ / _` | '_|// / |/ /| |/ / _` | || / _` | ' \/ _` | _ \
 \___\__,_|_|\_, /|___(_)___/\__,_|\_,_\__, |_||_\__,_|//_/
home page:  /___/                      /___/                  gpg public key:
http://www.oranda.demon.co.uk           http://www.oranda.demon.co.uk/key.asc



reply via email to

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