我遵循了 OpenGL-tutorial.org 上的每一条指令,下载了 2.1 代码,通过指定 xcode 的 cmake 运行它并使用它的默认编译器。我配置直到红线消失然后点击生成。但是,它生成的项目文件在 xcode 中打开时显示以下错误:
/OpenGL-tutorial_v0010_21/external/AntTweakBar-1.15/src/LoadOGLCore.h:149:24: Conflicting types for 'glMultiDrawElements'
/OpenGL-tutorial_v0010_21/external/AntTweakBar-1.15/src/LoadOGLCore.h:214:24: Conflicting types for 'glShaderSource'
/external/AntTweakBar-ObjectiveC/LoadOGLCore.mm:116:1: Cannot initialize a variable of type 'PFNglMultiDrawElements' (aka 'void (*)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei)') with an lvalue of type 'void (GLenum, const GLsizei *, GLenum, const GLvoid *const *, GLsizei)': type mismatch at 4th parameter ('const GLvoid **' (aka 'const void **') vs 'const GLvoid *const *' (aka 'const void *const *'))
/external/AntTweakBar-ObjectiveC/LoadOGLCore.mm:116:1: Cannot initialize a variable of type 'PFNglMultiDrawElements' (aka 'void (*)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei)') with an lvalue of type 'void (GLenum, const GLsizei *, GLenum, const GLvoid *const *, GLsizei)': type mismatch at 4th parameter ('const GLvoid **' (aka 'const void **') vs 'const GLvoid *const *' (aka 'const void *const *'))
我正在使用 Xcode 4.6.1 和 cmake 2.8-10
这可能是cmake或教程代码有问题吗?