ios - 如何摆脱 Apple Mach-O 链接器错误?

标签 ios objective-c xcode xcode5

首先我有一个无法构建模块基础

尝试通过将启用模块(C 和 Objective-C) 设置为 NO 来解决该问题

在另一次构建之后,我收到这些奇怪的错误:

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_EAGLContext", referenced from:
      objc-class-ref in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
  "_OBJC_CLASS_$_GLKBaseEffect", referenced from:
      objc-class-ref in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
  "_OBJC_CLASS_$_GLKViewController", referenced from:
      _OBJC_CLASS_$_EZAudioPlotGLKViewController in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
  "_OBJC_CLASS_$_NSEntityDescription", referenced from:
      objc-class-ref in JSONModel+CoreData.o
  "_OBJC_CLASS_$_NSManagedObject", referenced from:
      l_OBJC_$_CATEGORY_NSManagedObject_$_JSONModel in JSONModel+CoreData.o
      objc-class-ref in JSONModel+CoreData.o
  "_OBJC_METACLASS_$_GLKViewController", referenced from:
      _OBJC_METACLASS_$_EZAudioPlotGLKViewController in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
  "_SSLClose", referenced from:
      -[GCDAsyncSocket closeWithError:] in GCDAsyncSocket.o
  "_SSLCopyPeerTrust", referenced from:
      -[GCDAsyncSocket ssl_continueSSLHandshake] in GCDAsyncSocket.o
  "_SSLCreateContext", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLGetBufferedReadSize", referenced from:
      ___33-[GCDAsyncSocket flushSSLBuffers]_block_invoke in GCDAsyncSocket.o
      -[GCDAsyncSocket doReadData] in GCDAsyncSocket.o
  "_SSLHandshake", referenced from:
      -[GCDAsyncSocket ssl_continueSSLHandshake] in GCDAsyncSocket.o
  "_SSLRead", referenced from:
      -[GCDAsyncSocket flushSSLBuffers] in GCDAsyncSocket.o
      -[GCDAsyncSocket doReadData] in GCDAsyncSocket.o
  "_SSLSetCertificate", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLSetConnection", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLSetEnabledCiphers", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLSetIOFuncs", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLSetPeerDomainName", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLSetPeerID", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLSetProtocolVersionMax", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLSetProtocolVersionMin", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLSetSessionOption", referenced from:
      -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o
  "_SSLWrite", referenced from:
      -[GCDAsyncSocket doWriteData] in GCDAsyncSocket.o
  "_glBindBuffer", referenced from:
      -[EZAudioPlotGLKViewController _updateBufferPlotBufferWithAudioReceived:withBufferSize:] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
      -[EZAudioPlotGLKViewController _updateRollingPlotBufferWithAudioReceived:withBufferSize:] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
      -[EZAudioPlotGLKViewController _drawBufferPlotWithView:drawInRect:] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
      -[EZAudioPlotGLKViewController _drawRollingPlotWithView:drawInRect:] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
  "_glBufferData", referenced from:
      -[EZAudioPlotGLKViewController _updateBufferPlotBufferWithAudioReceived:withBufferSize:] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
      -[EZAudioPlotGLKViewController _updateRollingPlotBufferWithAudioReceived:withBufferSize:] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
  "_glBufferSubData", referenced from:
      -[EZAudioPlotGLKViewController _clearRollingPlot] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
      -[EZAudioPlotGLKViewController _updateBufferPlotBufferWithAudioReceived:withBufferSize:] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
      -[EZAudioPlotGLKViewController _updateRollingPlotBufferWithAudioReceived:withBufferSize:] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
      -[EZAudioPlotGLKViewController _updateRollingPlotDisplay] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
  "_glClear", referenced from:
      -[EZAudioPlotGLKViewController glkView:drawInRect:] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
  "_glClearColor", referenced from:
      -[EZAudioPlotGLKViewController _refreshWithBackgroundColor:] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
  "_glDrawArrays", referenced from:
      -[EZAudioPlotGLKViewController _drawBufferPlotWithView:drawInRect:] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
      -[EZAudioPlotGLKViewController _drawRollingPlotWithView:drawInRect:] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
  "_glEnableVertexAttribArray", referenced from:
      -[EZAudioPlotGLKViewController _drawBufferPlotWithView:drawInRect:] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
      -[EZAudioPlotGLKViewController _drawRollingPlotWithView:drawInRect:] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
  "_glGenBuffers", referenced from:
      -[EZAudioPlotGLKViewController viewDidLoad] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
  "_glLineWidth", referenced from:
      -[EZAudioPlotGLKViewController viewDidLoad] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
  "_glPopMatrix", referenced from:
      -[EZAudioPlotGLKViewController _drawBufferPlotWithView:drawInRect:] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
      -[EZAudioPlotGLKViewController _drawRollingPlotWithView:drawInRect:] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
  "_glPushMatrix", referenced from:
      -[EZAudioPlotGLKViewController _drawBufferPlotWithView:drawInRect:] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
      -[EZAudioPlotGLKViewController _drawRollingPlotWithView:drawInRect:] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
  "_glVertexAttribPointer", referenced from:
      -[EZAudioPlotGLKViewController _drawBufferPlotWithView:drawInRect:] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
      -[EZAudioPlotGLKViewController _drawRollingPlotWithView:drawInRect:] in EZAudioPlotGLKViewController-11ED1EEF7D7801BD.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我一无所知。这是在我从 SVN 存储库更新此项目后发生的。

最佳答案

您需要链接以下框架:

CoreData.framework
GLKit.framework
Security.framework

这是在 Xcode 的以下部分中完成的:

enter image description here

关于ios - 如何摆脱 Apple Mach-O 链接器错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25240082/

相关文章:

iphone - 如何使用ldid?

ios - 如何将 Storyboard UIViewController 与我的自定义 UIViewController 类相关联?

iphone - 我应该在哪里创建和展示整个 iPhone 应用程序中使用的 Modal ViewController

objective-c - 淡入/淡出文本动画

ios - 如何为 DLRadioButton 设置按钮标签? -iOS Objective-C

iphone - 从 UIViewController 访问 UIView

ios - Autorelease 池和在 iOS 下调用 release 的时间

ios - 当 VC 链接到 TabBarController 时,IBOutlet 和 IBAction 被禁用

ios - NSInvalidArgumentException',原因 : 'Receiver (<ViewController:>) has no segue with identifier ' ''

iphone - 我收到两个与不正确的 Xcode 语法有关的错误