[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua c api from a loaded dll / .so?
- From: Doug <douglas.linder@...>
- Date: Mon, 16 Jul 2012 12:25:45 +0800
With much mucking around I've managed to gen a copy of the app with
exported symbols and running against that (without the duplicate
runtime) totally works!
thanks for you help~
~
Doug.
On Sun, Jul 15, 2012 at 10:25 PM, Peter Cawley <lua@corsix.org> wrote:
> On Sun, Jul 15, 2012 at 2:55 PM, Doug <douglas.linder@gmail.com> 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:
>> http://lua-users.org/lists/lua-l/2008-01/msg00671.html
>>
>> 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.
>