Sharing a lua_State across DLL boundary
Julien Lebot <[email protected]>
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <[email protected]> |
Hi all, I have a DLL which opens a lua_State and calls luabind::open on it. I then expose a few classes to it, and all is working well. Now I have a client executable that links with this DLL and where I'd like to expose some more classes, so I obtain the lua_State created in this DLL, bind a few more classes to it. The problem is when I try to call functions from Lua on those classes lua/luabind crashes, either with "lua runtime error" if I did luabind::call_function and the lua function calls my new C++ classes' functions or something like "No matching overload found, candidates: void loadResource(ResourceManager&, std::string const&)" if I use lua_dofile and the file calls my new C++ classes' functions. Any idea ? Regards, Julien Lebot ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd