[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Finding libs required by a static lib?
From: |
Stephen Brandon |
Subject: |
Finding libs required by a static lib? |
Date: |
Wed, 27 Feb 2002 10:15:56 +0000 |
I've got a slight problem with SndKit.
One of the libraries SndKit requires is libst.a, the "sox" backend library.
Depending on what libraries sox's ./configure finds on the system, libst.a
will potentially link to a number of dynamic libs on the system. (eg vorbis)
When the time comes to write a GNUmakefile for a program using SndKit, each
of these libraries needs to be listed like this:
ADDITIONAL_TOOL_LIBS += -lSndKit -lvorbis -lvorbisenc -lvorbisfile
Ideally I would like SndKit itself to be linked against these libraries, so
they do not need to be specified in the final app's makefiles. Or, I could
make a special makefile type that is auto-generated after getting the
requisite info from libst.a.
The problem is that I don't know how to find out what libraries libst.a has
needs to be linked with. I can't use ldd because libst.a is not dynamic. I
can't use ldd against libSndKit.so.1.0.0 because though it has linked against
libst.a, it has not linked against these extra libraries hence they are not
listed.
All I seem to be able to do is to test link a small app and see what symbols
are undefined, then because I know which libraries they come from I can
manually determine which libs to link against. But that's not really
automatible.
Can anyone advise on a way around this? Is there a tool that can do this?
Cheers,
Stephen Brandon
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Finding libs required by a static lib?,
Stephen Brandon <=