简体   繁体   English

FFmpeg libavcodec.a Xcode链接器问题 - 架构arm64的未定义符号

[英]FFmpeg libavcodec.a Xcode linker issues - Undefined symbols for architecture arm64

I've build FFmpeg for iOS using this script: https://github.com/kewlbear/FFmpeg-iOS-build-script 我使用这个脚本为iOS构建FFmpeg: https//github.com/kewlbear/FFmpeg-iOS-build-script

I built for all architectures, then I built again just for arm64 (as my desired arch), and I've even used other build scripts to build FFmpeg for iOS. 我为所有架构构建,然后我再次为arm64构建(作为我想要的拱门),我甚至使用其他构建脚本来构建适用于iOS的FFmpeg。 However, I keep running into the same issues: 但是,我一直遇到同样的问题:

Undefined symbols for architecture arm64:
  "_VTDecompressionSessionCreate", referenced from:
      _av_videotoolbox_default_init2 in libavcodec.a(videotoolbox.o)
  "_VTDecompressionSessionDecodeFrame", referenced from:
      _videotoolbox_common_end_frame in libavcodec.a(videotoolbox.o)
  "_VTDecompressionSessionInvalidate", referenced from:
      _av_videotoolbox_default_free in libavcodec.a(videotoolbox.o)
  "_VTDecompressionSessionWaitForAsynchronousFrames", referenced from:
      _videotoolbox_common_end_frame in libavcodec.a(videotoolbox.o)

I've tried 我试过了

  • changing the architecture settings in Build Settings of my project 更改项目的“构建设置”中的体系结构设置
  • setting Dead Code Stripping to NO 将死代码剥离设置为NO
  • Double checked my library/linker search paths 双重检查我的库/链接器搜索路径

Note that all the linker errors come from the same static library (libavcodec.a). 请注意,所有链接器错误都来自同一个静态库(libavcodec.a)。 This leads me to believe that I'm missing some other library that the linker needs specifically for these symbols. 这让我相信我错过了链接器专门针对这些符号所需的其他库。 I've added all the libraries that are mentioned for an FFmpeg build - see image below: 我添加了FFmpeg构建中提到的所有库 - 请参见下图:

链接二进制文件/库的快照

Any help is appreciated. 任何帮助表示赞赏。 Thanks! 谢谢!

成功构建并消除显示的链接器错误所需的框架是VideoToolbox.framework

我通过在构建阶段VideoToolbox.framework中的链接库中添加VideoToolbox.framework解决了这个问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM