lua-users home
lua-l archive

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

If you compile everything as /MT and do not use any DLLs that use
MSVCRT.LIB or Lua (compiled with /MD) then life is cool. i.e. /MT
implies a monolithic executable. /MT statically links the RTL code
(with each exectable and each DLL). It further imples that each
exe or dll will need to be linked with a lua static library.

/MT means you cannot dynamically load luasocket (or anything else)
with require(). (Actually you can, you just risk multiple copies of the
lua_code and multiple RTLs).


In fact
On 10/17/07, gary ng <> wrote:
> --- Diego Nehab <> wrote:
> > Hi,
> >
> > How about we compile Lua and all Lua extension
> > libraries in
> > LuaBinaries against a stub CRT DLL.
> That would be good but quite complex.
> I am thinking if it is necessary to use MSVCRT.DLL at
> all ? My understanding is that it is necessary mainly
> in the area where file handles(both FILE * as well as
> the fileno as it seems to have one more level of
> indirection in Windows so stdin(0) is something inside
> the CRT rather than a handle of the process). So if we
> can be sure that these things are only used inside
> luasocket, can it be just compiled with /MT instead of
> /MD so the C functions are statically linked ?
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around