Evan DeMond | 3 Oct 07:30
Picon

Mixing wxLua and LPeg?

Hi all,

I've got a project that runs on the wxLua binary, a big executable with a Lua interpreter statically linked in (to the best of my knowledge.) Now I'd like to mix in LPeg as well, which seems to want to link to its own Lua library (whether dynamically or statically, not sure.) I count two Lua interpreters getting loaded in that setup...

Am I going to have Problems? Any obvious ways around this?

Thanks,

Evan
Shmuel Zeigerman | 3 Oct 11:29

Re: Mixing wxLua and LPeg?

Evan DeMond wrote:
> I've got a project that runs on the wxLua binary, a big executable with 
> a Lua interpreter statically linked in (to the best of my knowledge.) 
> Now I'd like to mix in LPeg as well, which seems to want to link to its 
> own Lua library (whether dynamically or statically, not sure.) I count 
> two Lua interpreters getting loaded in that setup...
> 
> Am I going to have Problems? Any obvious ways around this?

You may (or may not) have problems.

Two "brute force" solutions would be:
a) either decompose wxLua from the Lua library (link dynamically), or
b) link LPeg statically into wxLua

Otherwise, some known workarounds can be found on lua-users wiki [1-4], 
and [4] seems to be the most suitable to your task.

[1] http://lua-users.org/wiki/LuaProxyDll
[2] http://lua-users.org/wiki/LuaProxyDllTwo
[3] http://lua-users.org/wiki/LuaProxyDllThree
[4] http://lua-users.org/wiki/LuaProxyDllFour

--

-- 
Shmuel

Evan DeMond | 3 Oct 14:28
Picon

Re: Mixing wxLua and LPeg?


Otherwise, some known workarounds can be found on lua-users wiki [1-4], and [4] seems to be the most suitable to your task.

[1] http://lua-users.org/wiki/LuaProxyDll
[2] http://lua-users.org/wiki/LuaProxyDllTwo
[3] http://lua-users.org/wiki/LuaProxyDllThree
[4] http://lua-users.org/wiki/LuaProxyDllFour

--
Shmuel

Thanks! I wasn't aware of those. I am using MinGW, though, so it looks like the approach of rebuilding wxLua might be the way to go here. Thanks for the advice,

Evan
RJP Computing | 3 Oct 15:14
Picon

Re: Mixing wxLua and LPeg?

On Fri, Oct 3, 2008 at 8:28 AM, Evan DeMond <evan.demond <at> gmail.com> wrote:
Thanks! I wasn't aware of those. I am using MinGW, though, so it looks like the approach of rebuilding wxLua might be the way to go here. Thanks for the advice,

I suggest you look at Lua for Windows (http://luaforwindows.luaforge.net). It contains wxLua and LPeg already built and ready to use. Also it comes with many more modules.
--
Regards,
Ryan
Mark Meijer | 5 Oct 01:43
Picon

Re: Mixing wxLua and LPeg?

Not sure if I'm missing something here, but wouldn't it solve your
problem if you just used the wxLua small-exe-plus-DLL's package? Check
the downloads, there should be a -bin.zip and a -dll.zip file download
(e.g. wxLua-2.8.7.0-MSW-bin.zip and wxLua-2.8.7.0-MSW-dll.zip)... The
-bin.zip has the big statically linked exe's, what you need is the
-dll.zip, methinks.

2008/10/3 Evan DeMond <evan.demond <at> gmail.com>:
> Hi all,
>
> I've got a project that runs on the wxLua binary, a big executable with a
> Lua interpreter statically linked in (to the best of my knowledge.) Now I'd
> like to mix in LPeg as well, which seems to want to link to its own Lua
> library (whether dynamically or statically, not sure.) I count two Lua
> interpreters getting loaded in that setup...
>
> Am I going to have Problems? Any obvious ways around this?
>
> Thanks,
>
> Evan
>


Gmane