<DIV>Below is my build procedure:</DIV>
<DIV>#cd ffmpeg</DIV>
<DIV>#./configure --arch=x86 --target-os=linux </DIV>
<DIV>#make</DIV>
<DIV>#make install</DIV>
<DIV>#cd doc/examples/</DIV>
<DIV>#make</DIV>
<DIV>Then there are some error occurs. Following is the error log:</DIV>
<DIV>Package libswresample was not found in the pkg-config search path.<BR>Perhaps you should add the directory containing `libswresample.pc'<BR>to the PKG_CONFIG_PATH environment variable<BR>No package 'libswresample' found<BR>Package libswresample was not found in the pkg-config search path.<BR>Perhaps you should add the directory containing `libswresample.pc'<BR>to the PKG_CONFIG_PATH environment variable<BR>No package 'libswresample' found<BR>cc   decoding_encoding.o    -lm -o decoding_encoding<BR>decoding_encoding.o: In function `video_encode_example':<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:342: undefined reference to `avcodec_find_encoder'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:348: undefined reference to `avcodec_alloc_context3'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:365: undefined reference to `avcodec_open2'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:376: undefined reference to `avcodec_alloc_frame'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:387: undefined reference to `av_image_alloc'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:396: undefined reference to `av_init_packet'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:420: undefined reference to `avcodec_encode_video2'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:437: undefined reference to `avcodec_encode_video2'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:454: undefined reference to `avcodec_close'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:455: undefined reference to `av_free'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:456: undefined reference to `av_freep'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:457: undefined reference to `av_free'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:429: undefined reference to `av_free_packet'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:446: undefined reference to `av_free_packet'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:362: undefined reference to `av_opt_set'<BR>decoding_encoding.o: In function `audio_decode_example':<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:243: undefined reference to `av_init_packet'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:248: undefined reference to `avcodec_find_decoder'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:254: undefined reference to `avcodec_alloc_context3'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:257: undefined reference to `avcodec_open2'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:286: undefined reference to `avcodec_get_frame_defaults'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:288: undefined reference to `avcodec_decode_audio4'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:295: undefined reference to `av_samples_get_buffer_size'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:281: undefined reference to `avcodec_alloc_frame'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:321: undefined reference to `avcodec_close'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:322: undefined reference to `av_free'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:323: undefined reference to `av_free'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:269: undefined reference to `av_free'<BR>decoding_encoding.o: In function `video_decode_example':<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:489: undefined reference to `av_init_packet'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:497: undefined reference to `avcodec_find_decoder'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:503: undefined reference to `avcodec_alloc_context3'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:512: undefined reference to `avcodec_open2'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:525: undefined reference to `avcodec_alloc_frame'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:554: undefined reference to `avcodec_decode_video2'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:580: undefined reference to `avcodec_decode_video2'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:595: undefined reference to `avcodec_close'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:596: undefined reference to `av_free'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:597: undefined reference to `av_free'<BR>decoding_encoding.o: In function `main':<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:606: undefined reference to `avcodec_register_all'<BR>decoding_encoding.o: In function `audio_encode_example':<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:117: undefined reference to `avcodec_find_encoder'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:123: undefined reference to `avcodec_alloc_context3'<BR>decoding_encoding.o: In function `select_channel_layout':<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:88: undefined reference to `av_get_channel_layout_nb_channels'<BR>decoding_encoding.o: In function `audio_encode_example':<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:139: undefined reference to `av_get_channel_layout_nb_channels'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:142: undefined reference to `avcodec_open2'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:154: undefined reference to `avcodec_alloc_frame'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:166: undefined reference to `av_samples_get_buffer_size'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:168: undefined reference to `av_malloc'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:175: undefined reference to `avcodec_fill_audio_frame'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:186: undefined reference to `av_init_packet'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:198: undefined reference to `avcodec_encode_audio2'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:211: undefined reference to `avcodec_encode_audio2'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:224: undefined reference to `av_freep'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:225: undefined reference to `av_freep'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:226: undefined reference to `avcodec_close'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:227: undefined reference to `av_free'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:205: undefined reference to `av_free_packet'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:219: undefined reference to `av_free_packet'<BR>/work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:131: undefined reference to `av_get_sample_fmt_name'<BR>collect2: ld returned 1 exit status<BR>make: *** [decoding_encoding] Error 1<BR></DIV>
<DIV>Can you tell me the right build procedure?</DIV>
<DIV> </DIV>
<DIV>Thanks and Regards,</DIV>
<DIV>Stefan</DIV>
<DIV><includetail>
<DIV><BR></DIV>
<DIV><BR></DIV>
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 12px; PADDING-BOTTOM: 2px; PADDING-TOP: 2px; FONT-FAMILY: Arial Narrow">------------------ Original ------------------</DIV>
<DIV style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px">
<DIV><B>From: </B> "Carl Eugen Hoyos"<cehoyos@ag.or.at>;</DIV>
<DIV><B>Date: </B> Wed, Sep 12, 2012 07:02 PM</DIV>
<DIV><B>To: </B> "libav-user"<libav-user@ffmpeg.org>; <WBR></DIV>
<DIV></DIV>
<DIV><B>Subject: </B> Re: [Libav-user] How to Use FFmpeg Decode Libraries</DIV></DIV>
<DIV><BR></DIV>Myth <286166657@...> writes:<BR><BR>> I have downloaded the latest FFmepg source code. <BR>> I faced a new question, I don't know how to build <BR>> the test examples located in doc/examples/<BR><BR>$ make<BR>?<BR>(It seems to me you have to install FFmpeg first.)<BR><BR>Carl Eugen<BR><BR>_______________________________________________<BR>Libav-user mailing list<BR>Libav-user@ffmpeg.org<BR>http://ffmpeg.org/mailman/listinfo/libav-user<BR>
<DIV></DIV></includetail></DIV>