lua-users home
lua-l archive

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


Thomas Harning wrote:

On May 21, 2008, at 1:38 PM, Stefan wrote:
MinGW is happier if you avoid VC DLLs altogether, and simply build Lua from source using MinGW (or just use the Win32_mingw*_lib LuaBinaries packages). You end up with a rock-solid, much smaller set of Lua files that have no external dependencies. So small is it, that I always statically link Lua when building under MinGW these days.
The 'VC' dlls are always used... MinGW just defaults to using msvcrt.dll which is technically VC6 and earlier.

Microsoft decided to be "backwards-compatible" at the bug-level when they upgrade the C runtime. So you're stuck with tons of runtime choices:
 VC6's
 VC2002
 VC2003
 VC2005
 VC2008

Not to mention the additional options for each:
 +Debug/Release
 +SingleThreaded/MultiThreaded
 +Static/DLL

MinGW doesn't get you out of the runtime DLL woods in Windows... it just lets you not be tied to a specific runtime DLL per 'compiler version'. The runtime DLL choice is available w/ different import libraries for which there's a tool out there to help manage this import library...


Thanks for the polite correction. My Unix-born innocence has suffered many such embarrassments over the years...

So how does one go about using the "Lua For Windows" install with MinGW? I ask because I have been approached by a number of programming students/interns on how to get started with Lua using Eclipse + CDT (the cross-platform IDE of choice around here, which utilizes MinGW on Windows to provide GCC/GDB)

They would like to get comfortable with the language directly at first, by running through PiL and using the interactive Lua interpreter. Then they would like to move up to embedding it into their existing C\C++ projects.

I at first pointed them to the Lua.org site, but then lost almost half to various frustrations getting started (kids these days, eh?)