Ошибки при сборке настроенного ffmpeg4.1 с libavcodec.58 и opencv - PullRequest
0 голосов
/ 08 июля 2019

Я пытаюсь создать свой собственный ffmpeg версии 4.1. Как мы знаем, ffmpeg4.1 требуется libavcodec.so.58 и другие связанные библиотеки (новейшие). У меня есть некоторые функции, связанные с opencv в моем коде, такие как cvLoadImage и другие. Я обновил библиотеки libopencv-highgui-dev, libopencv_core-dev и libopencv_imgproc-dev. Когда я запускаю make-файл, я получаю следующие ошибки:

/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `av_free_packet@LIBAVCODEC_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `av_write_frame@LIBAVFORMAT_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `av_frame_alloc@LIBAVUTIL_55'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `avformat_free_context@LIBAVFORMAT_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `avformat_write_header@LIBAVFORMAT_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `av_rescale_q@LIBAVUTIL_55'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `av_write_trailer@LIBAVFORMAT_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `sws_getCachedContext@LIBSWSCALE_4'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `avcodec_find_encoder@LIBAVCODEC_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `av_free@LIBAVUTIL_55'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `avcodec_encode_video2@LIBAVCODEC_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `av_seek_frame@LIBAVFORMAT_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `av_lockmgr_register@LIBAVCODEC_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `avcodec_decode_video2@LIBAVCODEC_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `avcodec_open2@LIBAVCODEC_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `av_malloc@LIBAVUTIL_55'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `avio_close@LIBAVFORMAT_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `av_init_packet@LIBAVCODEC_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `av_log_set_level@LIBAVUTIL_55'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `avpicture_get_size@LIBAVCODEC_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `avformat_get_riff_video_tags@LIBAVFORMAT_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `avformat_close_input@LIBAVFORMAT_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `avpicture_fill@LIBAVCODEC_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `avformat_network_init@LIBAVFORMAT_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `avformat_find_stream_info@LIBAVFORMAT_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `avcodec_close@LIBAVCODEC_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `av_guess_codec@LIBAVFORMAT_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `avio_open@LIBAVFORMAT_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `av_guess_format@LIBAVFORMAT_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `avformat_open_input@LIBAVFORMAT_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `av_register_all@LIBAVFORMAT_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `sws_getContext@LIBSWSCALE_4'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `avformat_new_stream@LIBAVFORMAT_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `av_frame_free@LIBAVUTIL_55'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `av_sub_q@LIBAVUTIL_55'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `av_freep@LIBAVUTIL_55'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `avcodec_find_decoder@LIBAVCODEC_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `sws_freeContext@LIBSWSCALE_4'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `sws_scale@LIBSWSCALE_4'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `avformat_alloc_context@LIBAVFORMAT_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `av_read_frame@LIBAVFORMAT_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `av_codec_get_id@LIBAVFORMAT_57'
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `avcodec_flush_buffers@LIBAVCODEC_57'

Я четко связал новейшие библиотеки и включил их в мой make-файл. Список ошибок, показывающий мне, что libopencv-highgui.so указывает на api версии libavcodec.57. Не обновлен ли opencv для поддержки библиотек libavXX.so.58? или я здесь что-то не так делаю.

Пожалуйста, помогите мне с этим, или любые предложения будут полезны.

...