I'm not sure I understand how interlib deps are expected to work. In a project of mine, I have several directories containing libs. For instance, in the ast/ directory I have the following Makefile.am snippet:
noinst_LTLIBRARIES = libast.la libast_la_SOURCES = \ position.hh location.hh \ ... libast.hh libast.hxx libast.cc \ tasks.hh tasks.cc
and to have interlib dependency support, I report that this lib depends on three siblings: symbol, task, and misc:
libast_la_LDFLAGS = -L../symbol -lsymbol -L../task -ltask -L../misc -lmisc
It seems that linking is correct:
/bin/sh ../../libtool --tag=CXX --mode=link g++ -Wall -W -Wcast-align -Wcast-qual -Wformat -Wmissing-prototypes -Wshadow -Wstrict-prototypes -Wwrite-strings -g -O2 -pipe -o libast.la -L../symbol -lsymbol -L../task -ltask -L../misc -lmisc decs.lo arrayexp.lo arrayty.lo assignexp.lo ast.lo breakexp.lo callexp.lo dec.lo escapable.lo exp.lo field.lo fieldinit.lo fieldvar.lo forexp.lo functiondec.lo ifexp.lo intexp.lo letexp.lo namety.lo nilexp.lo opexp.lo recordexp.lo recordty.lo seqexp.lo simplevar.lo stringexp.lo subscriptvar.lo ty.lo typable.lo typedec.lo var.lo vardec.lo whileexp.lo print-visitor.lo libast.lo tasks.lo rm -fr .libs/libast.a .libs/libast.laar cru .libs/libast.a .libs/decs.o .libs/arrayexp.o .libs/arrayty.o .libs/assignexp.o .libs/ast.o .libs/breakexp.o .libs/callexp.o .libs/dec.o .libs/escapable.o .libs/exp.o .libs/field.o .libs/fieldinit.o .libs/fieldvar.o .libs/forexp.o .libs/functiondec.o .libs/ifexp.o .libs/intexp.o .libs/letexp.o .libs/namety.o .libs/nilexp.o .libs/opexp.o .libs/recordexp.o .libs/recordty.o .libs/seqexp.o .libs/simplevar.o .libs/stringexp.o .libs/subscriptvar.o .libs/ty.o .libs/typable.o .libs/typedec.o .libs/var.o .libs/vardec.o .libs/whileexp.o .libs/print-visitor.o .libs/libast.o .libs/tasks.oranlib .libs/libast.acreating libast.la(cd .libs && rm -f libast.la && ln -s ../libast.la libast.la)
in the beginning -L../symbol -lsymbol -L../task -ltask -L../misc -lmisc do appear.
But when I try to link a small test case:
check_PROGRAMS = test-ast test_ast_SOURCES = test-ast.cc test_ast_LDADD = libast.la TESTS = test-ast
I have linking failures: neither symbol, task or misc is added. libast.la contains:
# Libraries that this one depends upon.
dependency_libs=' -L/Users/akim/src/tc/_build/src/symbol -L/Users/akim/src/tc/_build/src/task -L/Users/akim/src/tc/_build/src/misc '
is this normal? When I had -lsymbol etc. by hand, linking and execution passes.
How am I expected to do that?
If I try to link again libast as a dynamic library it fails to:
/bin/sh ../../libtool --tag=CXX --mode=link g++ -Wall -W -Wcast-align -Wcast-qual -Wformat -Wmissing-prototypes -Wshadow -Wstrict-prototypes -Wwrite-strings -g -O2 -pipe -o test-ast -last test-ast.o g++ -Wall -W -Wcast-align -Wcast-qual -Wformat -Wmissing-prototypes -Wshadow -Wstrict-prototypes -Wwrite-strings -g -O2 -pipe -o test-ast test-ast.o -Wl,-bind_at_load /Users/akim/src/tc/_build/src/ast/.libs/libast.ald: Undefined symbols:symbol::Symbol::Symbol[in-charge](std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)misc::Deref::Deref[in-charge](std::basic_ostream<char, std::char_traits<char> >&)misc::iendl(std::basic_ostream<char, std::char_traits<char> >&)misc::Escape::Escape[in-charge](std::basic_ostream<char, std::char_traits<char> >&)misc::decendl(std::basic_ostream<char, std::char_traits<char> >&)misc::incendl(std::basic_ostream<char, std::char_traits<char> >&)misc::decindent(std::basic_ostream<char, std::char_traits<char> >&)misc::incindent(std::basic_ostream<char, std::char_traits<char> >&)misc::Escape::escape_(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) constmake[2]: *** [test-ast] Error 1make[1]: *** [check-am] Error 2make: *** [check] Error 2
-last appears, but...
_______________________________________________ Libtool mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/libtool