I am trying to compile a blank Android project and getting errors right off the bat. I am using the latest 2.1.1 release. I get up to the build_native.sh step and then this happens.
$ ./build_native.sh NDK_ROOT = /ndkroot/ COCOS2DX_ROOT = /cocos2d21/MiniMixMayhem/proj.android/../.. APP_ROOT = /cocos2d21/MiniMixMayhem/proj.android/.. APP_ANDROID_ROOT = /cocos2d21/MiniMixMayhem/proj.android Using prebuilt externals make: Entering directory `/cocos2d21/MiniMixMayhem/proj.android' /ndkroot/build/core/add-application.mk:128: Android NDK: WARNING: APP_PLATFORM android-14 is larger than android:minSdkVersion 8 in ./AndroidManifest.xml Cygwin : Generating dependency file converter script Compile++ thumb : game_shared <= main.cpp In file included from jni/hellocpp/main.cpp:1:0: jni/../../Classes/AppDelegate.h:4:27: fatal error: CCApplication.h: No such file or directory compilation terminated. /ndkroot/build/core/build-binary.mk:269: recipe for target `obj/local/armeabi/objs/game_shared/hellocpp/main.o' failed make: *** [obj/local/armeabi/objs/game_shared/hellocpp/main.o] Error 1 make: Leaving directory `/cocos2d21/MiniMixMayhem/proj.android'
I have set up NDK_ROOT and the cocos2dx folders.
The folders /ndkroot, and /cocos2d21 are mounted windows folders inside cygwin. (The folders can’t be accessed through /cygdrive without going through a space)
The problem is that the compiler can’t find CCApplication.h. So I tried using cocos2d.h instead, but got the same error. So I decided to just include the file by pathname:
and verify that the file does exist:
$ ls /cocos2d21/cocos2dx/include/cocos2d.h /cocos2d21/cocos2dx/include/cocos2d.h
But the compiler STILL can’t it! Nor can it find any of the cocos2d header files, and dies in the same way:
jni/../../Classes/AppDelegate.h:4:49: fatal error: /cocos2d21/cocos2dx/include/cocos2d.h: No such file or directory compilation terminated.
Is there a specific way that the compiler is searching for header files that I don’t understand?