Re: inter-library dependencies

Evan Martin <martine cs washington edu> writes:

> I'm a little confused about inter-library dependencies.  Some pages I
> read claim that some platforms will not figure out that GTK's libraries
> internally use (for example) the X libraries, and so the X libraries
> need to be included on the linker command line for an executable that
> uses GTK.
> Yet pkg-config --libs gtk+-2.0 on my machine does not include the X
> libraries on the command line.  How does this work on those platforms
> that don't allow chained dependencies?  Does gtk generate a different
> .pc file on those platforms?  Does pkg-config handle this somehow?

GTK+ autodetects the situation and generates a differnet .pc file. 
See the the portions dealing with --enable-explicit-deps.

(The reason we added this code to avoid the explicit dependencies is
because we were adding dependencies on things like like Xft and Xrandr
which were more in flux than the old standby's of -lX11 -lm)


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