日期:2014-05-16  浏览次数:21281 次

/usr/local/ffmpeg/lib/libavfilter.so: undefined reference to `pp_get_context@LIB
  在嵌入式平台上用摄像头采集图像并转换为视频播放,写了应用程序,应用程序依赖libjpeg库和ffmpeg库。两个库都已经交叉编译通过,但是在编译应用程序的时候出现了以下错误,查了很多资料也没找到这类错误的解决办法,希望大家帮帮忙,谢谢了!


[root@localhost ffmpeg]# make
arm-linux-gcc encoding.c -I/usr/local/ffmpeg/include    -I/usr/local/libjpeg/include -c -o encoding.o
encoding.c: In function 'main':
encoding.c:369: warning: 'avcodec_alloc_context' is deprecated (declared at /usr/local/ffmpeg/include/libavcodec/avcodec.h:3423)
encoding.c:384: warning: 'avcodec_open' is deprecated (declared at /usr/local/ffmpeg/include/libavcodec/avcodec.h:3569)
encoding.c:533: warning: 'avcodec_encode_video' is deprecated (declared at /usr/local/ffmpeg/include/libavcodec/avcodec.h:4272)
encoding.c:577: warning: 'avcodec_encode_video' is deprecated (declared at /usr/local/ffmpeg/include/libavcodec/avcodec.h:4272)
arm-linux-gcc encoding.o -L/usr/local/ffmpeg/lib -lavdevice -lavformat -lavfilter -lavcodec -lswscale -lavutil    -L/usr/local/libjpeg/lib -l:libjpeg.so.8.3.0 -L/usr/local/ffmpeg/lib -l:libavdevice.so -o encoding
/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: library search path "/usr/local/libjpeg/lib" is unsafe for cross-compilation
/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: libswresample.so.0, needed by /usr/local/ffmpeg/lib/libavfilter.so, not found (try using -rpath or -rpath-link)
/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: libpostproc.so.52, needed by /usr/local/ffmpeg/lib/libavfilter.so, not found (try using -rpath or -rpath-link)
encoding.o: In function `main':
encoding.c:(.text+0x3bb0): undefined reference to `avcodec_init'
/usr/local/ffmpeg/lib/libavfilter.so: undefined reference to `pp_get_context@LIBPOSTPROC_52'
/usr/local/ffmpeg/lib/libavfilter.so: undefined reference to `pp_postprocess@LIBPOSTPROC_52'
/usr/local/ffmpeg/lib/libavfilter.so: undefined reference to `pp_free_context@LIBPOSTPROC_52'
/usr/local/ffmpeg/lib/libavfilter.so: undefined reference to `swr_set_channel_mapping@LIBSWRESAMPLE_0'
/usr/local/ffmpeg/lib/libavfilter.so: undefined reference to `pp_free_mode@LIBPOSTPROC_52'
/usr/local/ffmpeg/lib/libavfilter.so: undefined reference to `swr_alloc@LIBSWRESAMPLE_0'