Undefined symbols for architecture i386:
"lua_sethook(lua_State*, void (*)(lua_State*, lua_Debug*), int, int)", referenced from:
AppDelegate::applicationDidFinishLaunching() in AppDelegate.o
"lua_gethookmask(lua_State*)", referenced from:
AppDelegate::applicationDidFinishLaunching() in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
因为我在导入lua.h头文件没有 使用
extern "C" {
#include "lua.h"
}
的方式。
加上 extern "C" {} 就ok了