我正在尝试使用 build_native.sh 构建 cocos2d-x hello world 项目,它显示了一些编译错误。似乎NDK找不到cocos2d-x来源。首先它说:
NDK_ROOT = /cygdrive/c/Android-NDK-r4/android-ndk-r4-crystax
COCOS2DX_ROOT = /cygdrive/c/cocos2d-x/cocos2d-cocos2d-x-6e84662/firstapp/proj.android/../..
APP_ROOT = /cygdrive/c/cocos2d-x/cocos2d-cocos2d-x-6e84662/firstapp/proj.android/..
APP_ANDROID_ROOT = /cygdrive/c/cocos2d-x/cocos2d-cocos2d-x-6e84662/firstapp/proj.安卓
然后:
编译++ thumb:game_shared <= /cygdrive/c/cocos2d-x/cocos2d-cocos2d-x-6e84662/firstapp/proj.android/jni/hellocpp/main.cpp
在/cygdrive/c/cocos2d-x/cocos2d 包含的文件中-cocos2d-x-6e84662/firstapp/proj.android/jni/hellocpp/main.cpp:1:
/cygdrive/c/cocos2d-x/cocos2d-cocos2d-x-6e84662/firstapp/proj.android/jni/.. /../Classes/AppDelegate.h:4:27: 错误:CCApplication.h: 没有这样的文件或目录
/cygdrive/c/cocos2d-x/cocos2d-cocos2d-x-6e84662/firstapp/proj.android/jni/ hellocpp/main.cpp:2:44: 错误: platform/android/jni/JniHelper.h:
在/cygdrive/c/cocos2d-x/cocos2d-cocos2d-x-6e84662/firstapp/包含的文件中没有这样的文件或目录proj.android/jni/hellocpp/main.cpp:6:
/cygdrive/c/cocos2d-x/cocos2d-cocos2d-x-6e84662/firstapp/proj.android/jni/../../Classes/HelloWorldScene.h:4:21:错误:cocos2d.h:没有这样的文件或目录
以及更多的编译错误。
我使用 cocos2dx 网站教程,我使用的是 API 10(android 2.3.3) 和 windows 7。谁能帮我?