Using an existing Lua state
Posted: Tue Aug 30, 2011 17:28
Hello,
I am trying to use the Lua scripting module provided with CEGUI. The engine I am using, Leadwerks, also uses Lua (5.1) as the scripting language and thus I have access to an already open lua_State although I can only access it in the form of a byte pointer. My goal is to get that lua_State working with CEGUI. The initialization is as follows:
While this does compile, the run immediatly fails:
Yet I do have CEGUILuaScriptModule_d.dll on the path (and linked to libCEGUILuaScriptModule_d as well). Are there any additional DLL's I need to have on the path or is not possible to cast the byte pointer to the lua_State like I am doing? If this is not possible, are there any objections against having multiple states open at the same time?
Thanks!
I am trying to use the Lua scripting module provided with CEGUI. The engine I am using, Leadwerks, also uses Lua (5.1) as the scripting language and thus I have access to an already open lua_State although I can only access it in the form of a byte pointer. My goal is to get that lua_State working with CEGUI. The initialization is as follows:
Code: Select all
_ceguiScriptModule = &CEGUI::LuaScriptModule::create(reinterpret_cast<lua_State*> (lua));
While this does compile, the run immediatly fails:
The application failed with exit code -1073741515 (0xc0000135).
This could indicate that no required .dll was found in the PATH.
Yet I do have CEGUILuaScriptModule_d.dll on the path (and linked to libCEGUILuaScriptModule_d as well). Are there any additional DLL's I need to have on the path or is not possible to cast the byte pointer to the lua_State like I am doing? If this is not possible, are there any objections against having multiple states open at the same time?
Thanks!