c++ - Visual Studio 中的 ffmpeg 静态链接
问题描述
我已经在 Windows 上构建了 ffmpeg 静态库。似乎一切都顺利完成了。构建的结果是以下文件:
libavcodec.a
libavdevice.a
libavfilter.a
libavformat.a
libavutil.a
libswscale.a
我试图在我的 C++ libray 项目的 Linker->Input 中指定上述文件,但链接失败。以下是构建输出:
1>libavutil.a(samplefmt.o) : error LNK2001: unresolved external symbol ___stdio_common_vsprintf
1>libavutil.a(error.o) : error LNK2001: unresolved external symbol ___stdio_common_vsprintf
1>libavutil.a(log.o) : error LNK2001: unresolved external symbol ___stdio_common_vsprintf
1>libavutil.a(utils.o) : error LNK2001: unresolved external symbol ___stdio_common_vsprintf
1>libavutil.a(avstring.o) : error LNK2001: unresolved external symbol ___stdio_common_vsprintf
1>libavutil.a(bprint.o) : error LNK2001: unresolved external symbol ___stdio_common_vsprintf
1>libavformat.a(id3v2.o) : error LNK2001: unresolved external symbol ___stdio_common_vsprintf
1>libavutil.a(opt.o) : error LNK2001: unresolved external symbol ___stdio_common_vsprintf
1>libavutil.a(dict.o) : error LNK2001: unresolved external symbol ___stdio_common_vsprintf
1>libavutil.a(pixdesc.o) : error LNK2001: unresolved external symbol ___stdio_common_vsprintf
1>libavcodec.a(ratecontrol.o) : error LNK2001: unresolved external symbol ___stdio_common_vsprintf
1>libavcodec.a(qsv.o) : error LNK2001: unresolved external symbol ___stdio_common_vsprintf
1>libavformat.a(utils.o) : error LNK2001: unresolved external symbol ___stdio_common_vsprintf
1>libavformat.a(aviobuf.o) : error LNK2001: unresolved external symbol ___stdio_common_vsprintf
1>libavcodec.a(utils.o) : error LNK2001: unresolved external symbol ___stdio_common_vsprintf
1>libavcodec.a(ffv1enc.o) : error LNK2001: unresolved external symbol ___stdio_common_vsprintf
1>libavcodec.a(libvpxenc.o) : error LNK2001: unresolved external symbol ___stdio_common_vsprintf
1>libavcodec.a(exif.o) : error LNK2001: unresolved external symbol ___stdio_common_vsprintf
1>libavcodec.a(libvpxenc.o) : error LNK2001: unresolved external symbol _vpx_img_wrap
1>libavcodec.a(libvpxenc.o) : error LNK2001: unresolved external symbol _vpx_codec_version_str
1>libavcodec.a(libvpxdec.o) : error LNK2001: unresolved external symbol _vpx_codec_version_str
1>libavcodec.a(libvpxenc.o) : error LNK2001: unresolved external symbol _vpx_codec_build_config
1>libavcodec.a(libvpxdec.o) : error LNK2001: unresolved external symbol _vpx_codec_build_config
1>libavcodec.a(libvpxenc.o) : error LNK2001: unresolved external symbol _vpx_codec_err_to_string
1>libavcodec.a(libvpxenc.o) : error LNK2001: unresolved external symbol _vpx_codec_error
1>libavcodec.a(libvpxdec.o) : error LNK2001: unresolved external symbol _vpx_codec_error
1>libavcodec.a(libvpxenc.o) : error LNK2001: unresolved external symbol _vpx_codec_error_detail
1>libavcodec.a(libvpxdec.o) : error LNK2001: unresolved external symbol _vpx_codec_error_detail
1>libavcodec.a(libvpxenc.o) : error LNK2001: unresolved external symbol _vpx_codec_destroy
1>libavcodec.a(libvpxdec.o) : error LNK2001: unresolved external symbol _vpx_codec_destroy
1>libavcodec.a(libvpxenc.o) : error LNK2001: unresolved external symbol _vpx_codec_control_
1>libavcodec.a(libvpxenc.o) : error LNK2001: unresolved external symbol _vpx_codec_enc_init_ver
1>libavcodec.a(libvpxenc.o) : error LNK2001: unresolved external symbol _vpx_codec_enc_config_default
1>libavcodec.a(libvpxenc.o) : error LNK2001: unresolved external symbol _vpx_codec_encode
1>libavcodec.a(libvpxenc.o) : error LNK2001: unresolved external symbol _vpx_codec_get_cx_data
1>libavcodec.a(libvpxenc.o) : error LNK2001: unresolved external symbol _vpx_codec_vp8_cx
1>libavcodec.a(libvpxdec.o) : error LNK2001: unresolved external symbol _vpx_codec_dec_init_ver
1>libavcodec.a(libvpxdec.o) : error LNK2001: unresolved external symbol _vpx_codec_decode
1>libavcodec.a(libvpxdec.o) : error LNK2001: unresolved external symbol _vpx_codec_get_frame
1>libavcodec.a(libvpxdec.o) : error LNK2001: unresolved external symbol _vpx_codec_vp8_dx_algo
1>libavutil.a(opt.o) : error LNK2001: unresolved external symbol ___stdio_common_vsscanf
1>libavutil.a(parseutils.o) : error LNK2001: unresolved external symbol ___stdio_common_vsscanf
1>libavcodec.a(h264_sei.o) : error LNK2001: unresolved external symbol ___stdio_common_vsscanf
1>libavcodec.a(ratecontrol.o) : error LNK2001: unresolved external symbol ___stdio_common_vsscanf
1>libavcodec.a(qsv.o) : error LNK2001: unresolved external symbol ___stdio_common_vsscanf
1>libavformat.a(id3v2.o) : error LNK2001: unresolved external symbol ___stdio_common_vsscanf
1>libavutil.a(log.o) : error LNK2001: unresolved external symbol ___acrt_iob_func
1>libavutil.a(log.o) : error LNK2001: unresolved external symbol ___stdio_common_vfprintf
这里可能缺少什么?
解决方案
推荐阅读
- amazon-web-services - 用于对象搜索的机器学习
- node.js - Socket.io-redis 作为适配器添加到 Socket.io 实例时会出错
- progressive-web-apps - PWA:强制 window.open 打开浏览器而不是 PWA
- python - 在 Python 中合并/合并两个命名元组
- sql - 用于比较不同行/列中的值的 SQL 语句
- apache - 无法通过使用 wamp(虚拟主机)创建的 Internet 访问我的服务器
- ruby-on-rails - 如何在日期选择器上创建自定义 cron 作业?
- react-native - React Native - 从组件中获取价值 - onPress
- c - 在 C 中将 4 字节数据转换为 int
- python - Matplotlib 单图多个时间序列相同的 X 轴日期