Compilation on ndk-r7¶
After v0.10.0 release¶
It's fixed in #887, source code can define GL_GLEXT_PROTOTYPES=1 automatically in cocos2dx/platform/CCGL.h for android ndk r7
Before v0.10.0 release¶
Since GL_GLEXT_PROTOTYPES was defined in glplatform.h in previous revision NDK,
In r7, GL_GLEXT_PROTOTYPES was removed from glplatform.h.
So simply add -DGL_GLEXT_PROTOTYPES=1 in cocos2dx/Android.mk, like:
LOCAL_CFLAGS := -DUSE_FILE32API -DGL_GLEXT_PROTOTYPES=1
If we add -DGL_GLEXT_PROTOTYPES=1 in cocos2dx/Android.mk and build with ndk version before r7,
such as r6, then it will cause a lot of warning saying GL_GLEXT_PROTOTYPES is redefined.
So we don't change cocos2dx/Android.mk now, because r7 is new and I think many developers don't
use it. May be we will change it in next version of cocos2d-x.