[Ffmpeg-devel] how to compile output_example.c

Luca Abeni lucabe72
Sun Aug 6 11:52:18 CEST 2006


Hello,

On Sun, 2006-08-06 at 15:08 +0530, Turbo wrote:
> The ffmpeg installation automatically compiles output_example.c and 
> generates the executable output_example.
> But I have made a few changes into the source code and want to compile it 
> standalone. How to do it?
does "make output_example" work?

> I tried doing:-
> g++ -Wall -g -o output_example output_example.cpp -I
> /usr/local/include/ffmpeg/ -lavformat -lavcodec
> -lavutil -lm -lz -ldl
Why are you using g++ instead of gcc? Which kind of changes did you
apply to the code?

> But I am getting these errors:-
> undefined reference to `sws_getContext(int, int, int, int, int, int, int, 
> void*, void*, double*)'
> and
> undefined reference to `sws_scale(SwsContext*, unsigned char**, int*, int, 
> int, unsigned char**, int*)'
Are you sure that the avcodec, avformat, and avutil libraries that you
are trying to link are really the latest one from svn? (maybe they are
coming from a previous installation?)


				Luca





More information about the ffmpeg-devel mailing list