0

有人能告诉我如何解决这个错误吗?

jan@home:~/bin/cocos2dx/CocosTest/proj.android$ ./build_native.sh
NDK_ROOT = /home/jan/bin/android-ndk-r8d
COCOS2DX_ROOT = /home/jan/bin/cocos2dx/CocosTest/proj.android/../..
APP_ROOT = /home/jan/bin/cocos2dx/CocosTest/proj.android/..
APP_ANDROID_ROOT = /home/jan/bin/cocos2dx/CocosTest/proj.android
Using prebuilt externals
make: Entering directory `/home/jan/bin/cocos2dx/CocosTest/proj.android'
Compile++ thumb  : game_shared <= main.cpp
In file included from jni/hellocpp/main.cpp:6:0:
jni/../../Classes/DoYourJobScene.h:10:30: error: ISO C++ forbids declaration of 'LAYER_CREATE_FUNC' with no type [-fpermissive]
make: *** [obj/local/armeabi/objs/game_shared/hellocpp/main.o] Error 1
make: Leaving directory `/home/jan/bin/cocos2dx/CocosTest/proj.android'
jan@home:~/bin/cocos2dx/CocosTest/proj.android$

这里的来源:http: //jandroid.ch/CocosTest.tgz

4

1 回答 1

0

LAYER_CREATE_FUNC 和 SCENE_CREATE_FUNC 可以用一个宏 CREATE_FUNC 代替 看这个!

所以你应该知道怎么做。

于 2013-07-25T01:55:14.990 回答