--1.最近在写spine的lua-binding时,运行报错:
Undefined symbols for architecture armv7:
"register_spSkeletonData_manual(lua_State*)", referenced from:
register_spine_module(lua_State*) in libluacocos2d iOS.a(lua_cocos2dx_spine_manual.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--2.原因:做lua-luabing时在cocos/scripting/lua-bindings/manual/spine里新添加了两个文件:lua_spSkeletonData.hpp和lua_spSkeletonData.cpp,但是没有引入到工程中。
--3.解决方法:
----1.
Xcode项目栏:cocos2d_lua_bindings.xcodeproj->manual->spine,鼠标右击,Add Files to "cocos2d_lua_bindings.xcodeproj",添加以上两个文件。
----2.Target Membership勾选
点击刚才添加的两个文件,最右侧属性栏,找到Target Membership,把libluacocos2d Mac和libluacocos2d iOS都勾选上。