On Tue, Oct 25, 2005 at 04:29:20PM +0200, Gabor Gombas wrote: > On Mon, Oct 24, 2005 at 07:55:25PM +0200, Kurt Roeckx wrote: > > > > $ pkg-config --libs a > > > -la -lb > > ^^^ > > > > It should not link to libb if you only request it to link to > > liba. liba should have a DT_NEEDED for libb, and the linker > > should find the symbols liba needs from libb itself. > > No. Using "Requires:" instead of "Requires.private:" means that a's API > exposes the dependency on b
Then I guess it's either not used properly most of the time, or hard they make it hard to use it properly. > (for example, by directly referencing > symbols from libb in a's header files). In this case, you _do_ need to > link with libb explicitely, shared library dependencies won't help you. The liba is not designed properly, it's shouldn't expose that it's using libb. > Extreme example: it is possible that public headers from "a" reference > symbols from "b", but liba itself does not use any symbols from libb, > therefore it does not depend (in the DT_NEEDED sense) on libb at all. Which is completly broken. Kurt -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]