lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> Under windows this is not possible, since all DLL must have all
> dependencies resolved at compile time. So, you can build you application
> and link it with lua5.1.dll and build your modules (or just download them
> already built) against the same DLL.
>
...
> If you statically link every module (producing a dll for each modules)
> the luaVM code will be duplicated but should work.
>
> If you statically link all the modules to your application code (using
> the preload package table) it should work.

Lua may be re-entrant, but the MS RTL is not. So any library that uses
non-rentrant RTL funnctions will be in trouble when you dynamically
load static libraries. Examples of non-rerentrancy in the RTL (by
my reading) are: time(), strtok() etc and most importantly the DLL
initialization for malloc().

db