Has anyone come across this problem when building with cocos2d (OpenGL library for iPhone 2D games)?
"glui/GL/glui.h" file is not found
gluOrtho2D was not declared
GL_COLOR_BUFFER_BIT was not declared.
There seems to be very little info on GLUI for iPhone on t开发者_Go百科he web. I am new to OpenGL, so appreciate the help! I have included OpenGLES CoreGraphics libraries, even tried adding linker flag "-framework GLUI" but to no avail.
Thanks!
I solved this problem by
- removing cocos2d's external/Box2d/Testbed directory
- adding GLUI.framework from /Library/Frameworks/GLUI.framework (and setting the framework search path)
It compiles successfully, but dies on launching in simulator with this error, which seems unrelated to the question above.
dyld: Symbol not found: _CFXMLNodeGetInfoPtr
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.2.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security
I was finally able to get this working by following a different tutorial. The Monocles tutorial is outdated since it uses cocos2d v.0.7.2.
There has been significant change to cocos2d v.0.8, which comes pre-packaged with an easy to use XCode Project Template, and in v.0.9, libraries filenames have been further improved with the CC prefix to avoid namespace collision. I would recommend this tutorial instead:
http://iphonedev.net/2009/07/12/cocos2d-example-box2d/
Also found this to be useful. http://www.mycodestudio.com/blog/2009/12/06/cocos2dpt1/
精彩评论