XCode中简单的Torch应用

spa*_*ker 2 iphone xcode ios ios5

我正在尝试为iOS 5构建一个简单的火炬应用程序,如http://developer.apple.com/library/mac/releasenotes/AudioVideo/RN-AVFoundation/_index.html#//apple_ref/doc/uid/TP40010717所述-CH1-DontLinkElementID_17但我得到"Apple Match-O链接器错误:

    Undefined symbols for architecture armv7:
  "_AVMediaTypeVideo", referenced from:
      -[FirstViewController viewDidLoad] in FirstViewController.o
  "_OBJC_CLASS_$_AVCaptureDevice", referenced from:
      objc-class-ref in FirstViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)

任何帮助赞赏


有人吗?

另外:它只在运行项目时发生,如果我只是清理和构建没有错误,并且代码完成检测到库.

谢谢

Ran*_*all 5

您可能需要先将项目与AVFoundation框架链接起来.如果您已经这样做,请确保您正在构建armv7而不仅仅是armv6.在项目设置>目标>构建设置>体系结构中进行检查