weixin_45075999 2023-08-05 18:35 采纳率: 50%
浏览 10

编译程序 报错 undefined reference to `avcodec_encode_video2'

交叉编译 ffmepg opencv 成功后,编译程序,报错:
../lib/opencv/libopencv_videoio.a(cap_ffmpeg.cpp.o): In function icv_av_write_frame_FFMPEG(AVFormatContext*, AVStream*, unsigned char*, unsigned int, AVFrame*) [clone .isra.5]': cap_ffmpeg.cpp:(.text._ZL25icv_av_write_frame_FFMPEGP15AVFormatContextP8AVStreamPhjP7AVFrame.isra.5+0x24): undefined reference to av_init_packet'
cap_ffmpeg.cpp:(.text._ZL25icv_av_write_frame_FFMPEGP15AVFormatContextP8AVStreamPhjP7AVFrame.isra.5+0x44): undefined reference to avcodec_encode_video2' cap_ffmpeg.cpp:(.text._ZL25icv_av_write_frame_FFMPEGP15AVFormatContextP8AVStreamPhjP7AVFrame.isra.5+0x74): undefined reference to av_rescale_q'
cap_ffmpeg.cpp:(.text._ZL25icv_av_write_frame_FFMPEGP15AVFormatContextP8AVStreamPhjP7AVFrame.isra.5+0x94): undefined reference to av_rescale_q' cap_ffmpeg.cpp:(.text._ZL25icv_av_write_frame_FFMPEGP15AVFormatContextP8AVStreamPhjP7AVFrame.isra.5+0xac): undefined reference to av_rescale_q'
cap_ffmpeg.cpp:(.text._ZL25icv_av_write_frame_FFMPEGP15AVFormatContextP8AVStreamPhjP7AVFrame.isra.5+0xc4): undefined reference to av_write_frame' cap_ffmpeg.cpp:(.text._ZL25icv_av_write_frame_FFMPEGP15AVFormatContextP8AVStreamPhjP7AVFrame.isra.5+0xd0): undefined reference to av_packet_unref'
../lib/opencv/libopencv_videoio.a(cap_ffmpeg.cpp.o): In function `CvCapture_FFMPEG::init()':

  • 写回答

3条回答 默认 最新

  • 不良使 Python领域潜力新星 2023-08-05 18:48
    关注

    编译时找不到所需的ffmpeg库函数,你看看有没有正确安装ffmpeg和opencv库

    评论

报告相同问题?

问题事件

  • 创建了问题 8月5日

悬赏问题

  • ¥15 惠普360g9的最新bios
  • ¥15 配置hadoop时start-all.sh老是启动失败
  • ¥30 这个功能用什么软件发合适?
  • ¥60 微信小程序,取消订单,偶尔订单没有改变状态
  • ¥15 用pytorch实现PPO算法
  • ¥15 关于调制信号的星座图?
  • ¥30 前端传参时,后端接收不到参数
  • ¥15 这是有什么问题吗,我检查许可证了但是显示有呢
  • ¥15 机器学习预测遇到的目标函数问题
  • ¥15 Fluent,液体进入旋转区域体积分数不连续