我遵循OpenGL-tutorial.org上的每條指令,下載2.1代碼,通過指定xcode的cmake運行它並使用其默認編譯器。我配置,直到紅線消失,然後點擊生成。它雖然生成的項目文件,當在Xcode打開顯示以下錯誤:opengl教程xcode cmake
/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或教程代碼?
不相關:MacOS上的OpenGL界面已經過時,所以時間越流逝,對這個特定組合的過時教程就越多。對不起:/ – scones 2013-04-07 08:51:00
我一直在注意這個越來越多。找到足夠的東西甚至可以獲得基本的開始一直是一場噩夢。 :( – 2013-04-07 08:54:38