On date Tuesday 2008-03-11 07:00:32 +0000, Vladimir Eremeev wrote: > luigi <[EMAIL PROTECTED]> writes: > > > > > Hi I'm trying to link STATICALLY a program to libavcodec, libavformat and > > libswscale. Compilation seems ok, but when g++ arrives at the linking stage > > I > > get a lot of error messages: > > > > myprog.cpp:68: undefined reference to `av_find_stream_info' > > When linking statically, the order of libraries matters. > I have found the following in my archives: > -lavcodec -lpthread -lavformat -lavcodec -lavutil -lm -lz > > Here is some more information. > > http://users.actcom.co.il/~choo/lupg/tutorials/libraries/unix-c-libraries.html
Even better, use pkg-config in your Makefile, something like: FFMPEG_LDFLAGS=$(shell pkg-config libavformat) and it will automagically detects the correct flags to use for the installed libav*. Regards. -- Stefano Sabatini Linux user number 337176 (see http://counter.li.org) _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
