4 Sep 23:49
Re: LuaRocks with Windows/Visual Studio
From: Ross Berteig <Ross <at> CheshireEng.com>
Subject: Re: LuaRocks with Windows/Visual Studio
Newsgroups: gmane.comp.lang.lua.general
Date: 2008-09-04 21:49:34 GMT
Subject: Re: LuaRocks with Windows/Visual Studio
Newsgroups: gmane.comp.lang.lua.general
Date: 2008-09-04 21:49:34 GMT
Sometime on 9/4/2008, "Mark Meijer" <meijer78 <at> gmail.com> wrote: >2008/9/3 Ross Berteig <Ross <at> cheshireeng.com>: >> Unfortunately, once you get into an open system where it is >> expected that other components just plug in, then everything >> that loads within a single process must comply with the same >> standards. > >I'm assuming that standard for LuaRocks on Windows is MSVCRT80.DLL, >for the provided interpreter (LuaBinaries) as well as any precompiled >dll's in the default repository (is this true?). However: That is the case at the moment. Of course, at some point MSVCR80.DLL will be out of date. VS2008 uses MSVCR90.DLL by default, for instance, and the next version of VS will likely include a yet newer CRT. Scuri builds LuaBinaries for a disturbingly large number of compilers and runtime libraries on Windows alone, but LfW has standardized on MSVCR80.DLL (technically the SxS assembly known as Microsoft.VC80.CRT) as the preferred runtime for their package. Any library that is intended to just work with LfW must be buildable against that CRT. Any binary distribution of such a library must be built against that CRT. >> the off-the-shelf MinGW with -lmsvcrt80 gets you applications and >> DLLs that are *mostly* free of dependency on MSVCRT.DLL. Getting >> them completely free requires more effort. > >What I understand from this, is that any rocks I install (compile)(Continue reading)
Ultimately, this basically means that Lua can't actually rely on
having any fully-initialised CRT available. But for all practical
purposes, if you either (1) link with the CRT used by the main
application, or (2) use MSVCRT, you don't seem to hit issues.
Unfortunately, later MS compilers have no option to link with the
older CRT, so that there is no universal solution.
> This could be the way to kill this MSVCRT dumbness once and for all (well,
> testing new versions of MSVCRT w/ your app would be preferable)....
There has been talk of writing a library of precisely the CRT
functions Lua needs, and distributing that. For functions like the
various string and maths functions, there is clearly no dependency on
static data, so no initialisation issues can arise. Whether memory
allocation or IO can be done this way is a little less obvious.
Paul.
RSS Feed