mahdiolfat mahdiolfat - 29 days ago 9
iOS Question

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

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. 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

  • Double checked my library/linker search paths



Note that all the linker errors come from the same static library (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:

snapshot of linked binaries/libraries

Any help is appreciated. Thanks!

Answer

The framework needed to build successfully and get rid of the linker errors shown is VideoToolbox.framework

Comments