0

更新到 后Xcode 6.0.1,我的项目在链接阶段构建错误。我不知道为什么,但我确定那是关于OpenGLES. 因为当我删除有关它的代码时,它构建得很好。

以下是完整的错误消息:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_EAGLContext", referenced from:
      objc-class-ref in PPSSignatureView.o
  "_glDisable", referenced from:
      -[PPSSignatureView setupGL] in PPSSignatureView.o
  "_glGenVertexArraysOES", referenced from:
      -[PPSSignatureView setupGL] in PPSSignatureView.o
  "_glGenBuffers", referenced from:
      -[PPSSignatureView setupGL] in PPSSignatureView.o
  "_glBufferData", referenced from:
      -[PPSSignatureView setupGL] in PPSSignatureView.o
  "_glVertexAttribPointer", referenced from:
      -[PPSSignatureView bindShaderAttributes] in PPSSignatureView.o
  "_glDeleteVertexArraysOES", referenced from:
      -[PPSSignatureView tearDownGL] in PPSSignatureView.o
  "_glMapBufferOES", referenced from:
      _addVertex in PPSSignatureView.o
  "_glDrawArrays", referenced from:
      -[PPSSignatureView drawRect:] in PPSSignatureView.o
  "_glBindBuffer", referenced from:
      -[PPSSignatureView tap:] in PPSSignatureView.o
      -[PPSSignatureView pan:] in PPSSignatureView.o
      -[PPSSignatureView setupGL] in PPSSignatureView.o
  "_glClearColor", referenced from:
      -[PPSSignatureView drawRect:] in PPSSignatureView.o
  "_glDeleteBuffers", referenced from:
      -[PPSSignatureView tearDownGL] in PPSSignatureView.o
  "_glClear", referenced from:
      -[PPSSignatureView drawRect:] in PPSSignatureView.o
  "_glUnmapBufferOES", referenced from:
      _addVertex in PPSSignatureView.o
  "_glBindVertexArrayOES", referenced from:
      -[PPSSignatureView drawRect:] in PPSSignatureView.o
      -[PPSSignatureView setupGL] in PPSSignatureView.o
  "_glEnableVertexAttribArray", referenced from:
      -[PPSSignatureView bindShaderAttributes] in PPSSignatureView.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

和导入代码:importOpenGLES/ES2/glext.h

4

1 回答 1

7

听起来您没有链接到OpenGLES。

在您的项目设置中,转到“构建阶段”并在“将二进制文件与库链接”中添加 OpenGLES.framework。

于 2014-10-16T08:02:00.900 回答