我試圖建立的2.4所有版本,並在「鏈接CXX可執行../../bin/opencv_test_core」與他們全部失敗:錯誤建築OpenCV的2.4.x的「未定義參考av_opt_set @ LIBAVUTIL_51」
/usr/local/lib/libavcodec.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavformat.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavformat.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavformat.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavformat.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavformat.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavformat.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavformat.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavformat.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavformat.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavformat.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavformat.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `[email protected]_51'
/usr/local/lib/libavformat.so.54: undefined reference to `[email protected]IBAVUTIL_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `[email protected]_51'
我的CMakeLists.txt文件是默認的,但我將其更改爲使用TBB,禁用了文檔並打開了詳細模式。
做LDD /usr/local/lib/libavcodec.so.54我得到:
[email protected]:~/opencv/2.4.3/build# ldd /usr/local/lib/libavcodec.so.54
libavutil.so.51 => /usr/local/lib/libavutil.so.51 (0xb6132000)
libx264.so.123 => /usr/local/lib/libx264.so.123 (0xb5fc4000)
libvorbisenc.so.2 => /usr/local/lib/libvorbisenc.so.2 (0xb5e4a000)
libvorbis.so.0 => /usr/local/lib/libvorbis.so.0 (0xb5e14000)
libtheoraenc.so.1 => /usr/local/lib/libtheoraenc.so.1 (0xb5dcc000)
libtheoradec.so.1 => /usr/local/lib/libtheoradec.so.1 (0xb5dac000)
libopencore-amrwb.so.0 => /usr/local/lib/libopencore-amrwb.so.0 (0xb5d93000)
libopencore-amrnb.so.0 => /usr/local/lib/libopencore-amrnb.so.0 (0xb5d67000)
libmp3lame.so.0 => /usr/local/lib/libmp3lame.so.0 (0xb5cdd000)
libfaac.so.0 => /usr/local/lib/libfaac.so.0 (0xb5cc1000)
libm.so.6 => /lib/libm.so.6 (0xb5c44000)
libz.so.1 => /usr/lib/libz.so.1 (0xb5c29000)
libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1 (0xb5c02000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb5be3000)
libc.so.6 => /lib/libc.so.6 (0xb5ab8000)
libogg.so.0 => /usr/local/lib/libogg.so.0 (0xb5aac000)
/lib/ld-linux.so.3 (0x42228000)
任何人有任何想法,以什麼可能導致它,或者我能做些什麼來解決這個問題?我已經在這方面做了很長時間,並且處於虧損狀態。任何幫助將非常感激。
您可以嘗試關閉CMake中的'WITH_FFMPEG'選項並以此方式構建它,除非您需要ffmpeg支持。 – WildCrustacean
我能夠將ffmpeg從0.11降級到0.8來解決問題。不知道爲什麼會導致問題,但它是固定的。 – user1956554