[Ffmpeg-devel] Compiling ffmpeg with static libraries

Tyler Loch TylerL82
Fri Nov 4 21:05:32 CET 2005


I've read the DOCs and did quite a bit of searching on Google, but I haven't
found a concrete explanation of the proper way to prepare a statically-linked
ffmpeg binary on Mac OS X.

export MACOSX_DEPLOYMENT_TARGET=10.3, done.
crt0, done.

My ./configure script:
./configure --enable-faac --enable-faad --enable-xvid  --enable-x264
--enable-a52 --enable-pthreads --enable-gpl --disable-ffserver
--disable-ffplay --disable-vhook --extra-ldflags=-L/usr/local/lib
--extra-cflags=-I/usr/local/include

(I assume "--extra-ldflags=-L/usr/local/lib --extra-cflags=-I/usr/local/include"
is the key to having the libraries added to the executable, yes?)

libavutil, libavcodec and libavformat all seem to compile successfully, but the
final build of ffmpeg with all included libraries stumbles right at the end...

cc -static -L/usr/local/lib -g  -o ffmpeg_g ffmpeg.o cmdutils.o -L./libavformat
-lavformat -L./libavcodec -lavcodec -L./libavutil -lavutil -lfaac -lfaad
-lxvidcore -lx264 -lz -lpthread
ld: ffmpeg.o incompatible, file contains unsupported type of section 1
(__TEXT,__symbol_stub1) in load command 0 (must specify "-dynamic" to be used)
ld: cmdutils.o incompatible, file contains unsupported type of section 1
(__TEXT,__symbol_stub1) in load command 0 (must specify "-dynamic" to be used)
ld: can't locate file for: -lz
make: *** [ffmpeg_g] Error 1

Any help would be greatly appreciated.





More information about the ffmpeg-devel mailing list