[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Using LUA as static member
- From: Michael Wyman <michael@...>
- Date: Mon, 6 Dec 2010 17:04:13 -0600
In my experience your second and third points are plain common sense when writing for Windows. But I'm curious what the reasoning is behind your first point (don't link lua statically when embedding).
Is the dynamic linkage only an issue when you expect to allow scripts to require outside compiled modules, or does it apply even to a tightly sandbox-ed application?
My work so far with Lua has been Mac/Linux only, but I'm currently looking at an application available for both Windows and Mac and was anticipating static linkage on both platforms. To sandbox the scripts, including third-party compiled modules is not an anticipated. But if I need to consider dynamic linkage I'd love to know why before I start walking down a rocky path...
Regards,
-Michael Wyman
On Dec 5, 2010, at 1:28 AM, J.Jørgen von Bargen wrote:
> Am 05.12.2010 02:19, schrieb Pablo Garcia:
>> At this point I can use LUA but I hear a error sound of windows, no message, and when I try to do a second lua_pcall app crashes. If I don't do the second pcall, when app is closed i got other appcrash, but i cant debug it...
> This sounds familiar for me. Rules I've observed to obey, when using lua:
>
> * use lua in a dll - i.e. dont link it static (and dont mix this up with static member, same word, different things)
> * use msvcrt* in a dll - dont link it static
> * use the same version of VisualStudio, that was used to build the lua-dlls (or build them yourself)
>
> many problems vanished silently after I did these changes