Quick-lua 模拟器和xcode模拟器的区别

我c++层定义了一个静态方法 类似下边的方法

int Manager::selectDataWithInteger_lua(lua_State *L)
{
int n = lua_gettop(L);
if(n==1)
{

}
else
{
    
}
return 1;

}

接着注册

lua_register(engine->getLuaStack()->getLuaState(), “selectDataWithInteger_lua”, selectDataWithInteger_lua);

然后在lua中使用

local t1 = selectDataWithInteger_lua(“kkkkk”);

在xcode编译,执行没有问题。

但是在用quick的player模拟器跑的时候会出错(我已经用player编译了一遍,编译也没有出现错误)但是运行的时候就会出现以下错误。

12: attempt to call global ‘selectDataWithInteger_lua’ (a nil value)

这是为什么呢?

自己顶以下:2:

擦 看来大家都用tolua搞这玩意!

问题已经解决