Handling separate debug/release libraries

Tollef Fog Heen tfheen at err.no
Mon Jun 29 18:11:00 PDT 2009



| I am wondering how pkg-config can handle projects which are installing
| several (binary compatible) versions of the same library (i.e. release
| and debug).

if they're completely binary compatible, pkg-config doesn't need to
worry at all: you can choose which one you'd like to use at runtime. For
debug libraries, the usual way to do it (on Unix) is to ship either
unstripped binaries or detached debug symbols in /usr/lib/debug.

If your API and ABI varies on the other hand, you have to make sure to
choose the right one when compiling and linking.

Currently, the way people do that is to have different names of the .pc
files.  I agree this might not be completely optimal, so if anybody has
a better idea (and implementation), please. :-)

| But then I did not find a way to retrieve non-standard information
| using pkg-config.

you can use --variable and --define-variable, but that is a bit
cumbersome, IMO.

| PS: Is there a web browser for the Bazaar repository, I can not see
| anything on http://pkg-config.freedesktop.org/bzr/.

No, there isn't.  I'm considering moving to git partially because of

Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are

More information about the pkg-config mailing list