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

Re: Dependencies of -dev packages

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 (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.
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.


     MTA SZTAKI Computer and Automation Research Institute
                Hungarian Academy of Sciences

Reply to: