libtool
[Top][All Lists]
Advanced

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

Inter-library dependencies with uninstalled libtool libraries


From: Daniel Katz
Subject: Inter-library dependencies with uninstalled libtool libraries
Date: 09 Apr 2001 14:37:18 -0400
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Hi.

The following situation has arisen with inter-library dependencies and
I don't quite understand how to deal with it:

We are building a libtool library via automake which depends on
another libtool library which is built in a different subdirectory of
the same project.  I tried to set up the Makefile.am as follows:

------------------------------------------------------------------------
lib_LTLIBRARIES = libAdapterswigc.la

libAdapterswigc_la_SOURCES = StreamAdapter.cpp \
                             adapter_wrap.cpp

libAdapterswigc_la_LDFLAGS = -L$(MACYW_ROOT)/so

libAdapterswigc_la_LIBADD = -lTsiUtil \
                            -lTsiModelFuncs \
                            -lswigpy \
                            -lTsiNr \
                            -lPlcfitSwigc \
                            ../Core/libProfitLogicCore.la
------------------------------------------------------------------------

and got the following error:

------------------------------------------------------------------------
/bin/sh ../libtool --mode=link c++  -Wall -ansi -pedantic -g  -o 
libAdapterswigc.la -rpath /home/jjin/Agorai/lib -L../../macyw/so 
StreamAdapter.lo adapter_wrap.lo ../Core/libProfitLogicCore.la 
libtool: link: error: cannot link shared libraries into libtool libraries
------------------------------------------------------------------------


The other libraries listed in libAdapterswigc_la_LIBADD are all
installed shared libraries, and cause no trouble on their own.  It is
only when I add '../Core/libProfitLogicCore.la' to the LIBADD that all
hell breaks loose.


I did try using LDADD rather than LIBADD, but could not get that to
work either.  I also tried setting -L flags to pont to ../Core and
then -lProfitLogicCore, but then the system still had problems and
told me to use LIBADD rather than LDADD.  I have been reading the
libtool info docs and the _GNU Autoconf, Automake, and Libtool_ book,
but have not been able to find exactly what I need to get this to fly.

Any suggestions or pointers to the right place in the docs would be
useful and very much appreciated.

Thank you.

Dan Katz



P.S.  My system info is:

------------------------------------------------------------------------
$ libtool --version
ltmain.sh (GNU libtool) 1.3.5 (1.385.2.206 2000/05/27 11:12:27)

$ automake --version
automake (GNU automake) 1.4
[... Copyright etc. ...]

$ autoconf --version
Autoconf version 2.13

$ g++ --version
2.95.3

$ uname -a Linux devcl-n00 2.4.2 #1 SMP Thu Mar 1 09:54:59 EST 2001 i686 unknown
------------------------------------------------------------------------


If there is any other info that I can provide to help in getting an
answer to this question, please let me know.



reply via email to

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