lua-users home
lua-l archive

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

Two things should be noted for the CRT version:
* The end-user will require the appropriate runtime DLLs for the CRT
version (msvcrtXYZ.dll)
* Memory allocated with the one CRT version must be de-allocated with
that CRT version

Lua minimises the second point, as all (de)allocation is done by a
single specified alloc function. As for the first, some people prefer
version 6 MSVC, as the runtimes come with windows by default, whereas
some prefer version 9 as it's more recent and their application is
already using 9, so the runtimes are present already. In short, CRT
versions are compatible apart from (de)allocation.


2008/7/22 Paul Moore <>:
> I want to allow users of my application which embeds Lua to load
> external libraries (or at least, I thought I did until I started
> looking at this!) but I'm confused by all the various LuaBinaries
> available for Windows. A number of libraries claim to be "compatible
> with LuaBinaries", but given the number of options, I can't see what
> that means!
> I can see why there are multiple .lib files corresponding to different
> compilers, but it appears that the various Lua DLLs are linked with
> different versions of the MSVC runtime. Does this mean that extensions
> need to use the same CRT as well, so that an extension compatible with
> (say) is not compatible with
> If that's the case, I guess I have to leave CRT compatibility issues
> to users (and accept the rish that if they get it wrong, the hosting
> app may crash). Either that or use a static build of Lua and disable
> dynamic loading.
> Are there any other options I've missed?
> Paul.