[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua c api from a loaded dll / .so?
- From: Peter Cawley <lua@...>
- Date: Sun, 15 Jul 2012 15:25:52 +0100
On Sun, Jul 15, 2012 at 2:55 PM, Doug <firstname.lastname@example.org> wrote:
> Can anyone point me at a tutorial or possibly just give me some advice on
> how to call the lua c api from a plugin?
> I naively linked a second copy of the lua runtime in (ie. as part of the
> .so) thinking that might work, but I've stumbled into the same issue
> mentioned all the way back here:
> Crashes and burns on newkey() (this is with 5.1.3, which I'm stuck with)
You've correctly identified the issue; a lua_State* can only be used
with the copy of the Lua runtime which created it. If you're writing a
plugin for an application, then you'll need to talk to the authors of
the application in question to see if they export the symbols for
their copy of the Lua runtime.