Reference
Http://www.cocos2d-x.org/projects/cocos2d-x/wiki/How_to_build_and_run_HelloWorld
Script Generation ProjectHttp://www.cocos2d-x.org/projects/cocos2d-x/wiki/Chapter_1_-_How_to_Create_a_New_cocos2d-x_project_on_multi-platforms
- Set _ cygbin = c: \ cygwin \ bin
The path of cygwin Bin
- Set _ androidtools = D: \ anroid \ Android-SDK-Windows \ tools
The path of Android SDK tools
- Set _ ndkroot = D :\anroid \ android-ndk-r5b
The root of ndk
Installation directory:C: \ android-ndk-r7C: \ cocos2d-1.0.1-x-0.10.0C: \ cygwin at least need to install GCC and make tools, it is best to install vim.
Environment variable:Leoyangnc @ leoyangnc-PC ~ $ Cat env. shexport ndk_root =/cygdrive/C/android-ndk-r7export cocos2dx_root =/cygdrive/C/cocos2d-1.0.1-x-0.10.0alias ndk-build =/cygdrive/C/android-ndk-r7/ndk-build
Leoyangnc @ leoyangnc-PC/cygdrive/C/cocos2d-1.0.1-x-0.10.0/helloworld/Android $ cat development # Set Params # android_ndk_root =/cygdrive/D/programe/Android/ndk/android-ndk-r6b # cocos2dx_root =/ cygdrive/e/cocos2d-xANDROID_NDK_ROOT =/cygdrive/C/android-ndk-r7COCOS2DX_ROOT =/cygdrive/C/cocos2d-1.0.1-x-0.10.0
CompileLeoyangnc @ leoyangnc-PC/cygdrive/C/cocos2d-1.0.1-x-0.10.0/helloworld/Android $. /build_native.sh/cygdrive/C/android-ndk-r7/cygdrive/C/cocos2d-1.0.1-x-0.10.0/helloworld/androidmake: Entering directory '/cygdrive/C/cocos2d-1.0.1-x-0.10.0/helloworld/Android' gdbserver: [arm-linux-androideabi-4.4.3] libs/armeabi/gdbservergdbsetup: libs/armeabi/GDB. setupgdbserver: [arm-linux-androideabi-4.4.3] libs/armeabi-v7a/gdbservergdbsetup: libs/armeabi-v7a/GDB. setupinstall: libcocos2d. so => libs/armeabi/libcocos2d. soinstall: libcosdenshion. so => libs/armeabi/libcocosdenshion. soinstall: libgame_logic.so => libs/armeabi/libgame_logic.soinstall: libhelloworld. so => libs/armeabi/libhelloworld. soinstall: libcocos2d. also => libs/armeabi-v7a/libcocos2d. soinstall: libcosdenshion. so => libs/armeabi-v7a/libcocosdenshion. soinstall: libgame_logic.so => libs/armeabi-v7a/libgame_logic.soinstall: libhelloworld. so => libs/armeabi-v7a/libhelloworld. somake: Leaving directory '/cygdrive/C/cocos2d-1.0.1-x-0.10.0/helloworld/android'/cygdrive/C/cocos2d-1.0.1-x-0.10.0/helloworld/Android fuse cocos2d-x 0.10.0 error after Android Compilation
Android SDK 15, ndk 7, cocos2d-x 0.10.0. This error occurs in the created Project helloworld. Ask the cause and solution.
Compile ++ thumb: cocos2d <= ccgrabber. cpp
JNI/.../cocos2dx/effects/ccgrabber. cpp: In constructor 'cocos2d: 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 (cocos2d: cctexture2d *)':
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 (cocos2d: cctexture2d *)':
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
SolutionOpen cocos2dx/Android. mk
Set the following line
Local_cflags: =-duse_file32api
Change
Local_cflags: =-duse_file32api-dgl_glext_prototypes = 1 ------------------------------------------------ may appear during Android ndk Compilation
Android ndk: Host 'awk' tool is outdated. Please define host_awk to point to gawk or nawk!SolutionLinxu platform: CD/cygdrive/C/android-ndk-r7/prebuilt/linux-x86/bin/awkwindows platform: CD/cygdrive/C/android-ndk-r7/prebuilt/Windows/bin/awk to the relevant directory to view, found that there is an awk execution file, that is, ndk comes with an expired awk tool by default, delete it (you can rename the MV for the sake of insurance) and re-build ndk-build! -----------------------------------------------------Create an android ProjectReference: callback.SolutionGo to project properties-> Java compiler-> compiler compliance level: the default value is 1.5. Change it to 1.6.