Errors when setting up Android

Hi,

I’m new to Cocos2Dx and I was trying to setup a project by following the guides on this set and another. I was able to get the iOS project setup, however when I try to compile it for Android, I receive the errors below. I have installed the Android NDK ver 7 & Android SDK and I compiled for Android 2.1 (my only options were 2.1 or 4.0). I also installed the latest version of Cocos2d. Would someone be able to assist with the errors below?

thanks,

Errors:
mpile*+ thumb : cocos2d <= CCSet.cpp
Compile*+ thumb : cocos2d <= CCZone.cpp
Compile*+ thumb : cocos2d <= cocos2d.cpp
Compile*+ thumb : cocos2d <= CCDirector.cpp
Compile++ thumb : cocos2d <= CCGrabber.cpp
jni/…/…/…/cocos2dx/effects/CCGrabber.cpp: In constructor ‘cocos2d::CCGrabber::CCGrabber()’:
jni/…/…/…/cocos2dx/effects/CCGrabber.cpp:46: error: ‘glGenFramebuffersOES’ was not declared in this scope
jni/…/…/…/cocos2dx/effects/CCGrabber.cpp: In member function ’void cocos2d::CCGrabber::grab(cocos2d::CCTexture2D**)‘:
jni/…/…/…/cocos2dx/effects/CCGrabber.cpp:61: error: ’glBindFramebufferOES’ was not declared in this scope
jni/…/…/…/cocos2dx/effects/CCGrabber.cpp:65: error: ‘glFramebufferTexture2DOES’ was not declared in this scope
jni/…/…/…/cocos2dx/effects/CCGrabber.cpp:68: error: ‘glCheckFramebufferStatusOES’ was not declared in this scope
jni/…/…/…/cocos2dx/effects/CCGrabber.cpp: In member function ’void cocos2d::CCGrabber::beforeRender‘:
jni/…/…/…/cocos2dx/effects/CCGrabber.cpp:88: error: ’glBindFramebufferOES’ was not declared in this scope
jni/…/…/…/cocos2dx/effects/CCGrabber.cpp: In member function ’void cocos2d::CCGrabber::afterRender‘:
jni/…/…/…/cocos2dx/effects/CCGrabber.cpp:113: error: ’glBindFramebufferOES’ was not declared in this scope
jni/…/…/…/cocos2dx/effects/CCGrabber.cpp: In destructor ‘virtual cocos2d::CCGrabber::~CCGrabber()’:
jni/…/…/…/cocos2dx/effects/CCGrabber.cpp:127: error: ‘glDeleteFramebuffersOES’ was not declared in this scope
make:**** [obj/local/armeabi/objs-debug/cocos2d/effects/CCGrabber.o] Error 1

May be you should refer [[Compilation on ndk-r7]].

Hi,

Thanks for the assistance, but I’m not really sure what I’m suppose to do with the information provided on that page. Am I suppose to update some value?

On a side note, I will say that setting Cocos2dx is harder than other frameworks, but never the less, I will persist on.

thanks,

Nevermind I saw the directions on the page and that worked!

thanks!

I’m having the same problem.
I have cocos2d-1.0.1-x-0.10.0 and ndk-r7 installed.
It says to add “LOCAL_CFLAGS := DUSE_FILE32APIDGL_GLEXT_PROTOTYPES=1” to cocos2dx/Android.mk
However there is no Android.mk file in the cocos2dx folder.
Instead I added it in cocos2dx/Project/Classes/Android.mk
However this does not resolve the problem.
Please help

Maybe your codes are error.
There is not cocos2dx/Project/Classes/Android.mk.
Under the root of the path where you installed cocos2dx, there should be cocos2dx/Android.mk.