请教高手cocos2dx编译的问题
答案:2 悬赏:80 手机版
解决时间 2021-03-18 14:05
- 提问者网友:伴风望海
- 2021-03-18 00:08
请教高手cocos2dx编译的问题
最佳答案
- 五星知识达人网友:一秋
- 2021-03-18 00:28
操作方法如下:
make: 进入目录“/cygdrive/e/cocos2d-x-2.1.4/Balloon/proj.android”
Compile++ thumb : game_shared <= AppDelegate.cpp
In file included from jni/../../Classes/AppDelegate.cpp:6:0:
jni/../../Classes/main.h:8:19: fatal error: tchar.h: No such file or directory
compilation terminated.
/cygdrive/f/Android/android-ndk-r9/build/core/build-binary.mk:348: recipe for target `obj/local/armeabi/objs/game_shared/__/__/Classes/AppDelegate.o' failed
make: *** [obj/local/armeabi/objs/game_shared/__/__/Classes/AppDelegate.o] Error 1
make: 离开目录“/cygdrive/e/cocos2d-x-2.1.4/Balloon/proj.android”
make: 进入目录“/cygdrive/e/cocos2d-x-2.1.4/Balloon/proj.android”
Compile++ thumb : game_shared <= AppDelegate.cpp
In file included from jni/../../Classes/AppDelegate.cpp:6:0:
jni/../../Classes/main.h:8:19: fatal error: tchar.h: No such file or directory
compilation terminated.
/cygdrive/f/Android/android-ndk-r9/build/core/build-binary.mk:348: recipe for target `obj/local/armeabi/objs/game_shared/__/__/Classes/AppDelegate.o' failed
make: *** [obj/local/armeabi/objs/game_shared/__/__/Classes/AppDelegate.o] Error 1
make: 离开目录“/cygdrive/e/cocos2d-x-2.1.4/Balloon/proj.android”
全部回答
- 1楼网友:怀裏藏嬌
- 2021-03-18 01:48
解决办法:
1.打开cocos2d-1.0.1-x-0.12.0\template\msvc\ccappwiz.win32\templates\1033\目录下的templates.inf文件
找到[! if cc_use_lua]节点,将节点的内容修改为:
../../../../../lua/cocos2dx_support/luacocos2d.cpp
../../../../../lua/cocos2dx_support/luacocos2d.h
../../../../../lua/cocos2dx_support/tolua_fix.c
../../../../../lua/cocos2dx_support/tolua_fix.h
../../../../../lua/cocos2dx_support/ccluaengine.cpp
../../../../../lua/cocos2dx_support/ccluaengine.h
2.保存后,新建支持lua的项目,将cocos2dx自带的hellolua工程下的appdelegate.h和appdelegate.cpp文件复制并替换新建的工程下的这两个文件。
3.将hellolua工程下resources目录下的所有文件复制并替换新建的工程下的resources目录下的所有文件。
4.编译工程,并设为启动项目,应该就可以运行了。
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯