Undefined symbols for architecture x86_64 in Objective-C

前端 未结 1 395
梦毁少年i
梦毁少年i 2021-01-23 04:42

I am attempting to implement the AVFoundation example code found here in an Xcode project: http://developer.apple.com/library/mac/#qa/qa1740/_index.html#//apple_ref/doc/uid/DTS4

相关标签:
1条回答
  • 2021-01-23 05:26

    It's not enough to import header files, you also have to add the AVFoundation framework to your project. This error comes from the linker, not from the compiler itself - the AVFoundation headers could be found and the compilation of your source files was successful, but the linker couldn't make an executable out of the resulting object files as you haven't told it (through Xcode's settings) to link against the AVFoundation framework.

    See this article on the compilation process to understand why this happens.

    0 讨论(0)
提交回复
热议问题