how should .pc files be configured for "static only" builds?
mgorny at gentoo.org
Thu May 22 00:30:25 PDT 2014
Dnia 2014-05-21, o godz. 10:45:09
Roger Pack <rogerdpack2 at gmail.com> napisał(a):
> It's come to my attention the following conundrum:
> in my own words, it seems impossible to know if, when calling
> pkg-config, the library was compiled statically or dynamically" (so
> you don't know whether to call pkg-config --static or not).
> Has there been any improvement/progress on this as of late?
No, and I doubt there ever will be. If there were real interest
in static linking, it would rather be focused on fixing/replacing
the static library format rather than improving work-arounds over it.
Static linking is practically always a wrong idea. You can look at 
for some reasoning though static linking is just one of the focuses of
that wiki page. You can also find some mentions of it on Diego's blog
If you're writing a build system for a project, don't take static
linking into consideration at all. If you're an user, just don't use
it ;). If you really need it, you're on your own and you probably don't
want to rely on any automated solutions like 'pkg-config --static'
at all. Instead, hand-pick necessary libraries and try to get as many
linked dynamically as possible :).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 966 bytes
Desc: not available
More information about the pkg-config