2013年8月25日星期日

/ Usr / local / ffmpeg / lib / libavfilter.so: undefined referenceto `pp_get_context @ LIB

In the embedded platform using camera images collected and converted to video playback, wrote the application, the application relies libjpeg libraries and ffmpeg library. Both libraries have been cross-compile, but when the application is compiled, the following error occurs, check did not find a lot of information solutions to such errors, we hope to help out, thank you!


[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 +0 x3bb0): 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

------ Solution ------------------------------------ --------
libavfilter.so this library depends on some function pp_get_context other linker can not find. libavfilter.so should not need to rely on other libraries, LIBPOSTPROC_52, LIBSWRESAMPLE_0 so on.
------ For reference only -------------------------------------- -


In ffmpeg / lib below about libraries:

libavcodec.a libavfilter.so.3.17.100 libpostproc.so.52
libavcodec.so libavformat.a libpostproc.so.52.0.100
libavcodec.so.54 libavformat.so libswresample.a
libavcodec.so.54.59.100 libavformat.so.54 libswresample.so
libavdevice.a libavformat.so.54.29.104 libswresample.so.0
libavdevice.so libavutil.a libswresample.so.0.15.100
libavdevice.so.54 libavutil.so libswscale.a
libavdevice.so.54.2.101 libavutil.so.51 libswscale.so
libavfilter.a libavutil.so.51.73.101 libswscale.so.2
libavfilter.so libpostproc.a libswscale.so.2.1.101
libavfilter.so.3 libpostproc.so pkgconfig

There are two libraries mentioned it

没有评论:

发表评论