问题:今天在编译2.2.6的工程时,编译到extensions库时,报了一个错误,错误如下:
In file included from E:/project/trunk/client/cocos2d-x-2.2.6/projects/Spartacus/proj.android/../../../extensions/CocoStudio/Armature/CCArmature.cpp:31:0:
E:/project/trunk/client/cocos2d-x-2.2.6/projects/Spartacus/proj.android/../../../extensions/../scripting/lua/cocos2dx_support/CCLuaEngine.h:29:17: fatal error: lua.h: No such file or directory
compilation terminated.
/cygdrive/e/worksoft/android-ndk-r9d/build/core/build-binary.mk:393: recipe for target 'obj/local/armeabi/objs/cocos_extension_static/CocoStudio/Armature/CCArmature.o' Failed
原因:
因为我们的项目使用了lua,而且又使用了骨骼动画,所以就修改了引擎,对骨骼动画部分加入了lua事件支持,于是就在CCArmature.cpp文件中引入了CCLuaEngine.h头文件及函数。
解决:
1)、于是我修改了android.mk文件,在LOCAL_C_INCLUDES 加入了脚本路径。
LOCAL_C_INCLUDES := $(CLASS_INCLUDES) \
$(LOCAL_PATH)/../scripting/lua/cocos2dx_support
解决还是不行,我想是不是因为没有引入脚本方面的库导致
2)、
在android.mk中加入
LOCAL_WHOLE_STATIC_LIBRARIES += luajit_static
$(call import-module,scripting/lua/proj.android)