lua-users home
lua-l archive

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

On Wed, Dec 30, 2009 at 6:23 PM, Wim Couwenberg
<> wrote:
>> If I use dynamic linking, the right version of the runtime lib
>> MSVCRxx.DLL has to be present on the target machine, if I understand
>> the docs correctly. At the moment, this is not an option for me.
> then your only option is to link everything statically (including
> lpeg) into a single exe.  your problem is that the .exe and the .dll
> each use their own (statically linked) version of the runtime.  that
> doesn't go down well, e.g. with memory management...
You should not link Lua statically if you're loading extension
modules, but you should be able to link the MSVC runtime statically,
as long as memory, files, etc. allocated in one DLL are deallocated in
the same DLL.

If you're distributing DLLs anyway, then why cannot you distribute
MSVCRxx.DLL alongside whatever other DLLs you are shipping?