How to solve problems with and android-ndk-r7 on cocos2d-x

I’ve upgrade from android-ndk r6 to r7 today and solved some problems I’ve found with awk.

After that I performed a full compilation on cocos2d-x’s HelloWorld to be sure everything else was ok.

I got an unpleasant surprise: it wasn’t.

The following errors show up:

After some research I found out the reason and the solution to the problem.

The reason:

In the previous releases of android-ndk GL_GLEXT_PROTOTYPES was defined in glplatform.h.
In r7, GL_GLEXT_PROTOTYPES was removed from glplatform.h.

The solution:

add -DGL_GLEXT_PROTOTYPES=1 in <PATH_TO_COCOS2DX>/cocos2dx/, like:


Please, try my games.

Disclaimer: I found the solution for this problem here. All kudos go to Splash Huang.

Please, try my games, play free on-line games on my site, tweet this post url and share it on facebook, google+ and other social medias.

This entry was posted in android, cocos2d and tagged , , , . Bookmark the permalink.