[Libav-user] Can not link ffmpeg without pkg-config

Peter Steinbach steinbach at scionics.de
Mon Aug 29 15:26:27 EEST 2016



On 08/29/2016 12:10 PM, Carl Eugen Hoyos wrote:
> 2016-08-29 10:52 GMT+02:00 Javier Lopez <jlopez2022 at gmail.com>:
>> Here are the error messages:
>
> This is missing the linker command you tried that would also help.
>
>> /home/acciona/ffmpeg2_sources/ffmpeg/libavformat/fifo.c:586: undefined
>> reference to `pthread_join'
>
> -pthreads or similar, depending on your system.
>
>> /home/acciona/ffmpeg2_sources/ffmpeg/libavformat/id3v2.c:1006: undefined
>> reference to `uncompress'
>
> -lz
>
>> /home/acciona/ffmpeg2_sources/ffmpeg/libavcodec/libfdk-aacdec.c:322:
>> undefined reference to `aacDecoder_Fill'
>
> -lfdk-aac
>
>> /home/acciona/ffmpeg2_sources/ffmpeg/libavcodec/libmp3lame.c:211: undefined
>> reference to `lame_encode_buffer_float'
>
> -lmp3lame
>
>> /home/acciona/ffmpeg2_sources/ffmpeg/libavcodec/libx264.c:280: undefined
>> reference to `x264_picture_init'
>
> -lx264
>
>> /home/acciona/ffmpeg2_sources/ffmpeg/libavcodec/vaapi.c:128: undefined
>> reference to `vaCreateBuffer'
>
> -lva (I think)
>
>> /home/acciona/ffmpeg2_sources/ffmpeg/libavutil/hwcontext_vaapi.c:891:
>> undefined reference to `XOpenDisplay'
>
> -lX11
>
> Please avoid top-posting here, Carl Eugen

Hi Carl Eugen et al,

jumping on this thread as I am also current biting my nails on this 
problem. I wanna redistribute ffmpeg symbols (from the static libs) with 
the library I am currently working on (also LGPL).

Upon build time of my library I cannot assume that pkg-config is 
available on the client machine. Hence, I need some fall-back for 
catching the dependencies of all libav* and friends that I need. This is 
especially tricky as I have to guess blindly what potentially these 
dependencies were during build time of ffmpeg itself (aka configure 
flags) and in which order they need to be linked against (I'd like to 
link against the static libraries).

How to go about that in a cross-platform way?
Best,
Peter


> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>


More information about the Libav-user mailing list