[FFmpeg-user] pkg-config --static ?

Jan Ehrhardt phpdev at ehrhardt.nl
Fri Aug 2 20:21:57 CEST 2013

Roger Pack in gmane.comp.video.ffmpeg.user (Tue, 18 Sep 2012 17:18:57
>Apparently nobody (including myself) really understand pkg-config.

I do not either...

>Here is an answer from fontconfig people:
>> I guess my only question mark here is "since I built fontconfig with
>> --disable-shared --enable-static" would you say that fontconfig is
>> still correct here?
>>AFAICT It's pkg-config's design no matter what the library has been built with.
>I'm really not sure how FFmpeg is supposed to "know" it's linking
>against a static library, and thus know to pass the "--static" flag to

I was having troubles today compiling fontconfig for Windows (cross
compile on Ubuntu) and ran into the same errors as you. Finally Google
pointed me to your remarks on this subject.

I made a special pair of require_pkg_config() and check_pkg_config()
functions for --enable-fontconfig in FFMpeg's configure, which did (for
fontconfig only) nothing more than

-    pkg_libs=$($pkg_config --libs $pkg)
+    pkg_libs=$($pkg_config --static --libs $pkg)

No more errors and finally a ffmpeg.exe that embeds subtitles in the
video. Weird issue, but thanks for reporting this almost a year ago!


More information about the ffmpeg-user mailing list