Log in

View Full Version : FFMpeg static build


vineet89
25th August 2011, 15:13
Hey guys
I have been trying to build a decoder application on top of ffmpeg libraries(avcodec, avutil etc.). My final goal is to extract the decoded frames and pass it to another application. So I want to make this into one library who\se methods I can access

I am trying to compile a static build of using libavcodec headers. I created libavcodec.a and other .a files using ffmpeg configure and make options.

My main files does a basic call like av_register_all(). Then I try gcc -c main.c. And then gcc main.o libavcodec.a libavutil.a libavformat.a -o main.

It gives me a ton of errors, all undefined references in various parts of code. I remember doing this with .so libraries but cant figure out this one.

Please help!!

J_Darnley
26th August 2011, 06:55
What other libraries were used in ffmpeg? libmp3lame for example. You need to link to those too. Watch which libs are linked to when ffmpeg is compiled then do the same yourself. Alternatively, use pkg-config, or read the *.pc files yourself.