当前位置: 技术问答>linux和unix
/usr/local/ffmpeg/lib/libavfilter.so: undefined reference to `pp_get_context@LIB
来源: 互联网 发布时间:2017-04-21
本文导语: 在嵌入式平台上用摄像头采集图像并转换为视频播放,写了应用程序,应用程序依赖libjpeg库和ffmpeg库。两个库都已经交叉编译通过,但是在编译应用程序的时候出现了以下错误,查了很多资料也没找到这类错误的...
在嵌入式平台上用摄像头采集图像并转换为视频播放,写了应用程序,应用程序依赖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'
/usr/local/ffmpeg/lib/libavfilter.so: undefined reference to `swr_set_matrix@LIBSWRESAMPLE_0'
/usr/local/ffmpeg/lib/libavfilter.so: undefined reference to `pp_get_mode_by_name_and_quality@LIBPOSTPROC_52'
/usr/local/ffmpeg/lib/libavfilter.so: undefined reference to `swr_next_pts@LIBSWRESAMPLE_0'
/usr/local/ffmpeg/lib/libavfilter.so: undefined reference to `swr_free@LIBSWRESAMPLE_0'
/usr/local/ffmpeg/lib/libavfilter.so: undefined reference to `swr_init@LIBSWRESAMPLE_0'
/usr/local/ffmpeg/lib/libavfilter.so: undefined reference to `swr_alloc_set_opts@LIBSWRESAMPLE_0'
/usr/local/ffmpeg/lib/libavfilter.so: undefined reference to `swr_convert@LIBSWRESAMPLE_0'
collect2: ld returned 1 exit status
make: *** [encoding] Error 1
[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'
/usr/local/ffmpeg/lib/libavfilter.so: undefined reference to `swr_set_matrix@LIBSWRESAMPLE_0'
/usr/local/ffmpeg/lib/libavfilter.so: undefined reference to `pp_get_mode_by_name_and_quality@LIBPOSTPROC_52'
/usr/local/ffmpeg/lib/libavfilter.so: undefined reference to `swr_next_pts@LIBSWRESAMPLE_0'
/usr/local/ffmpeg/lib/libavfilter.so: undefined reference to `swr_free@LIBSWRESAMPLE_0'
/usr/local/ffmpeg/lib/libavfilter.so: undefined reference to `swr_init@LIBSWRESAMPLE_0'
/usr/local/ffmpeg/lib/libavfilter.so: undefined reference to `swr_alloc_set_opts@LIBSWRESAMPLE_0'
/usr/local/ffmpeg/lib/libavfilter.so: undefined reference to `swr_convert@LIBSWRESAMPLE_0'
collect2: ld returned 1 exit status
make: *** [encoding] Error 1
|
libavfilter.so 这个库依赖的一些函数pp_get_context等链接程序找不到。libavfilter.so 应该需要依赖其他库,LIBPOSTPROC_52,LIBSWRESAMPLE_0等。
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。