mahdiolfat
mahdiolfat

Reputation: 961

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

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!

Upvotes: 3

Views: 4319

Answers (2)

MichaelMao
MichaelMao

Reputation: 571

I solved the problem by adding VideoToolbox.framework in the linking library in Building phasesVideoToolbox.framework

Upvotes: 3

mahdiolfat
mahdiolfat

Reputation: 961

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

Upvotes: 7

Related Questions