[Ffmpeg-devel] Compiling avcodec_sample on windows
Michel Bardiaux
mbardiaux
Thu Aug 11 16:22:03 CEST 2005
Matni, Nikolai wrote:
> Hi,
>
> I'm having a small problem compiling the avcodec_sample.cpp file provided on Martin Bohme's website. I'm using g++ on MINGW32 to try to compile the file.
> I get the following error msg:
>
> $ g++ -o avcodec_sample avcodec_sample.cpp -Ic:/ffmpeg -Ic:/ffmpeg/libavcodec -
> Ic:/ffmpeg/libavformat -Lavformat -Lavcodec -Lz
From the g++ man page:
-Ldir Add directory dir to the list of directories to be
searched for `-l'.
So I guess what you need is -Lc:/ffmpeg/libavformat -lavformat
Contrary to Windows commands, switches in Mingw *are* case-sensitive;
only the file names are not.
> C:/DOCUME~1/nmatni/LOCALS~1/Temp/ccewaaaa.o(.text+0x62):avcodec_sample.cpp: undefined reference to `avcodec_decode_video'
> C:/DOCUME~1/nmatni/LOCALS~1/Temp/ccewaaaa.o(.text+0xe1):avcodec_sample.cpp: undefined reference to `av_read_packet'
> C:/DOCUME~1/nmatni/LOCALS~1/Temp/ccewaaaa.o(.text+0x12b):avcodec_sample.cpp: undefined reference to `avcodec_decode_video'
> C:/DOCUME~1/nmatni/LOCALS~1/Temp/ccewaaaa.o(.text+0x241):avcodec_sample.cpp: undefined reference to `av_register_all'
> C:/DOCUME~1/nmatni/LOCALS~1/Temp/ccewaaaa.o(.text+0x25b):avcodec_sample.cpp: undefined reference to `av_open_input_file'
> C:/DOCUME~1/nmatni/LOCALS~1/Temp/ccewaaaa.o(.text+0x279):avcodec_sample.cpp: undefined reference to `av_find_stream_info'
> C:/DOCUME~1/nmatni/LOCALS~1/Temp/ccewaaaa.o(.text+0x2a0):avcodec_sample.cpp: undefined reference to `dump_format'
> C:/DOCUME~1/nmatni/LOCALS~1/Temp/ccewaaaa.o(.text+0x313):avcodec_sample.cpp: undefined reference to `avcodec_find_decoder'
> C:/DOCUME~1/nmatni/LOCALS~1/Temp/ccewaaaa.o(.text+0x358):avcodec_sample.cpp: undefined reference to `avcodec_open'
> C:/DOCUME~1/nmatni/LOCALS~1/Temp/ccewaaaa.o(.text+0x395):avcodec_sample.cpp: undefined reference to `avcodec_alloc_frame'
> C:/DOCUME~1/nmatni/LOCALS~1/Temp/ccewaaaa.o(.text+0x39d):avcodec_sample.cpp: undefined reference to `avcodec_alloc_frame'
> C:/DOCUME~1/nmatni/LOCALS~1/Temp/ccewaaaa.o(.text+0x3c8):avcodec_sample.cpp: undefined reference to `avpicture_get_size'
> C:/DOCUME~1/nmatni/LOCALS~1/Temp/ccewaaaa.o(.text+0x3fc):avcodec_sample.cpp: undefined reference to `avpicture_fill'
> C:/DOCUME~1/nmatni/LOCALS~1/Temp/ccewaaaa.o(.text+0x442):avcodec_sample.cpp: undefined reference to `img_convert'
> C:/DOCUME~1/nmatni/LOCALS~1/Temp/ccewaaaa.o(.text+0x48b):avcodec_sample.cpp: undefined reference to `av_free'
> C:/DOCUME~1/nmatni/LOCALS~1/Temp/ccewaaaa.o(.text+0x499):avcodec_sample.cpp: undefined reference to `av_free'
> C:/DOCUME~1/nmatni/LOCALS~1/Temp/ccewaaaa.o(.text+0x4a7):avcodec_sample.cpp: undefined reference to `avcodec_close'
> C:/DOCUME~1/nmatni/LOCALS~1/Temp/ccewaaaa.o(.text+0x4b5):avcodec_sample.cpp: undefined reference to `av_close_input_file'
>
> However, I can compile ffmpeg no problem, so I'm guessing there's something wrong with the tags that I have for g++. I have ffmpeg installed in c:/ffmpeg.
>
> Thank you,
> Nikolai Matni
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/ffmpeg-devel
--
Michel Bardiaux
R&D Director
MediaXim S.A. Bd. du Souverain, 191 B-1160 Bruxelles
Tel : +32 2 790.29.41
More information about the ffmpeg-devel
mailing list