gpt4 book ai didi

opencv - 构建 OpenCV 2.4.x 时出错 "Undefined reference to av_opt_set@LIBAVUTIL_51"

转载 作者:太空宇宙 更新时间:2023-11-03 21:54:43 24 4
gpt4 key购买 nike

我已经尝试构建 2.4 的所有版本,当“链接 CXX 可执行文件 ../../bin/opencv_test_core”时,它们都失败了:

/usr/local/lib/libavcodec.so.54: undefined reference to `av_opt_set@LIBAVUTIL_51'
/usr/local/lib/libavformat.so.54: undefined reference to `av_strcasecmp@LIBAVUTIL_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `av_bprint_finalize@LIBAVUTIL_51'
/usr/local/lib/libavformat.so.54: undefined reference to `av_timecode_make_smpte_tc_string@LIBAVUTIL_51'
/usr/local/lib/libavformat.so.54: undefined reference to `av_timecode_make_string@LIBAVUTIL_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `av_realloc_f@LIBAVUTIL_51'
/usr/local/lib/libavformat.so.54: undefined reference to `av_timecode_get_smpte_from_framenum@LIBAVUTIL_51'
/usr/local/lib/libavformat.so.54: undefined reference to `av_timecode_init@LIBAVUTIL_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `av_samples_set_silence@LIBAVUTIL_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `av_calloc@LIBAVUTIL_51'
/usr/local/lib/libavformat.so.54: undefined reference to `av_opt_get@LIBAVUTIL_51'
/usr/local/lib/libavformat.so.54: undefined reference to `av_strncasecmp@LIBAVUTIL_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `av_samples_fill_arrays@LIBAVUTIL_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `av_get_media_type_string@LIBAVUTIL_51'
/usr/local/lib/libavformat.so.54: undefined reference to `av_dynarray_add@LIBAVUTIL_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `av_bprint_init@LIBAVUTIL_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `av_asprintf@LIBAVUTIL_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `av_sample_fmt_is_planar@LIBAVUTIL_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `av_samples_get_buffer_size@LIBAVUTIL_51'
/usr/local/lib/libavformat.so.54: undefined reference to `av_opt_get_int@LIBAVUTIL_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `av_timecode_make_mpeg_tc_string@LIBAVUTIL_51'
/usr/local/lib/libavformat.so.54: undefined reference to `av_rescale_q_rnd@LIBAVUTIL_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `av_bprintf@LIBAVUTIL_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `av_samples_copy@LIBAVUTIL_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `av_get_default_channel_layout@LIBAVUTIL_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `av_timecode_init_from_string@LIBAVUTIL_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `av_bprint_chars@LIBAVUTIL_51'
/usr/local/lib/libavformat.so.54: undefined reference to `av_des_mac@LIBAVUTIL_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `av_timecode_adjust_ntsc_framenum@LIBAVUTIL_51'
/usr/local/lib/libavformat.so.54: undefined reference to `av_timegm@LIBAVUTIL_51'
/usr/local/lib/libavcodec.so.54: undefined reference to `av_tempfile@LIBAVUTIL_51'

我的 CMakeLists.txt 文件是默认文件,只是我将其更改为使用 TBB、禁用了文档并打开了详细模式。

执行 ldd/usr/local/lib/libavcodec.so.54 我得到:

root@omap4-multi:~/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)

任何人都知道可能导致它的原因,或者我可以做些什么来解决它?我已经为此工作了很长一段时间,但不知所措。任何帮助将不胜感激。

最佳答案

我有一个类似的问题,但这是 ffmpeg 的问题,如果你升级了一个或多个 ffmpeg 的依赖项。 Ffmpeg 需要重新编译或更新其所有依赖项

关于opencv - 构建 OpenCV 2.4.x 时出错 "Undefined reference to av_opt_set@LIBAVUTIL_51",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14206156/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com