[FFmpeg-user] Unable to compile Ffmpeg example extract_mvs.c
Ashish Gadkari
ashishgadkari1992 at gmail.com
Sat Sep 10 11:52:45 EEST 2016
Hi,
I have compiled and installed ffmpeg successfully on Ubuntu 16.04 using
this article - https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
I tried to compile the *extract_mvs.c *example using following *command*-
gcc -w -I ~/ffmpeg_build/include/ extract_mvs.c -o example.o -L
~/ffmpeg_build/lib/
But it is throwing following *errors:*
/tmp/ccTGuZpN.o: In function `av_make_error_string':
extract_mvs.c:(.text+0x24): undefined reference to `av_strerror'
/tmp/ccTGuZpN.o: In function `decode_packet':
extract_mvs.c:(.text+0x9d): undefined reference to `avcodec_decode_video2'
extract_mvs.c:(.text+0x126): undefined reference to `av_frame_get_side_data'
/tmp/ccTGuZpN.o: In function `open_codec_context':
extract_mvs.c:(.text+0x292): undefined reference to `av_find_best_stream'
extract_mvs.c:(.text+0x2ac): undefined reference to
`av_get_media_type_string'
extract_mvs.c:(.text+0x314): undefined reference to `avcodec_find_decoder'
extract_mvs.c:(.text+0x329): undefined reference to
`av_get_media_type_string'
extract_mvs.c:(.text+0x367): undefined reference to `av_dict_set'
extract_mvs.c:(.text+0x37e): undefined reference to `avcodec_open2'
extract_mvs.c:(.text+0x391): undefined reference to
`av_get_media_type_string'
/tmp/ccTGuZpN.o: In function `main':
extract_mvs.c:(.text+0x43b): undefined reference to `av_register_all'
extract_mvs.c:(.text+0x459): undefined reference to `avformat_open_input'
extract_mvs.c:(.text+0x49b): undefined reference to
`avformat_find_stream_info'
extract_mvs.c:(.text+0x53b): undefined reference to `av_dump_format'
extract_mvs.c:(.text+0x576): undefined reference to `av_frame_alloc'
extract_mvs.c:(.text+0x5c7): undefined reference to `av_init_packet'
extract_mvs.c:(.text+0x6b2): undefined reference to `av_packet_unref'
extract_mvs.c:(.text+0x6c6): undefined reference to `av_read_frame'
extract_mvs.c:(.text+0x70a): undefined reference to `avcodec_close'
extract_mvs.c:(.text+0x714): undefined reference to `avformat_close_input'
extract_mvs.c:(.text+0x71e): undefined reference to `av_frame_free'
collect2: error: ld returned 1 exit status
Please suggest any changes necessary for compiling this program in detail.
Thanks in advance.
--
Ashish
More information about the ffmpeg-user
mailing list