However, to my disappointment, the lua module for CEGUI always give me Segmentation fault every time when it tries to run lua function, such as lua_call and scriptmodule::createbindings (which invoke tolua++ to run lua).
I have successfully compiled the lua script module library. And script module even crashes when initializing. Like the code in sample 8:
Code: Select all
LuaScriptModule& scriptmod(LuaScriptModule::create());
Even this line will trigger errors. But this time, error is Arithmetic exception in luaC_step () , probably occurred in lua_call in the constructor of script module. But when i copy those code out and run them in my program, they works fine. That's weird.
And the then function setScriptmodule() will trigger Segmentation fault when it tries to call binding function. (Apparently every attempt to run lua inside module)
By the way, 'i specify the library and headers for lua5.1 and tolua++5.1 in my program, otherwise I'll get link error in CEGUI lua module, all the lua calls works fine outside the CEGUI.
Any advice? I stack on this problem for a whole day and still can't use CEGUILuaScriptmodule (it seems sample doesn't work either, I just ignored it before). Thanks.