Ross Berteig | 3 Sep 20:07

Re: LuaRocks with Windows/Visual Studio

Sometime on AM 9/3/2008, "Mark Meijer" <meijer78 <at> gmail.com> wrote:
>Thanks both for the info. But does this mean I'll need to link 
>with MSVCR80.DLL at all, when using MinGW? The Microsoft runtime
>is one of those things I was hoping to leave behind.

Only if you need binary compatibility with DLLs and/or hosting 
applications that were linked with that MS C runtime. Mixing 
runtimes in a single process is a recipe for very hard to diagnose 
bugs.

If you are distributing an application where you are compiling all
components yourself, and do not expect end-users to load arbitrary
DLLs that they build themselves (or locate prebuilt at LuaForge or 
perhaps with something like LuaRocks) then you get to decide what
CRT and other implicit dependencies are required.

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.

Ross Berteig                               Ross <at> CheshireEng.com
Cheshire Engineering Corp.           http://www.CheshireEng.com/ 

Mark Meijer | 4 Sep 00:14

Re: LuaRocks with Windows/Visual Studio

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:

> 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)
using MinGW will either depend on an old VC6 runtime (MSVCRT.DLL), or
on *both* the old and the new one (MSVCRT80.DLL), depending on whether
or not by whatever magic the -lmsvcrt80 option is used. And if I use
Visual Studio, many rocks will not compile at all. So.... stop me if
I'm missing something, but basically my choices are:

1: Use Visual Studio and not a lot of rocks (i.e. forget about
LuaRocks and, where needed, "manually" port the modules I use to VS).

2: Use MinGW and two different C runtimes.

3: Go the cygwin route and effectively turn my development environment
(as well as whatever environment my projects should run on) into unix,
and (presumably) don't use LuaBinaries. This is assuming it solves the
problems of both options 1 and 2, though I don't know that it actually
does.
(Continue reading)

RJP Computing | 4 Sep 03:23
Gravatar

Re: LuaRocks with Windows/Visual Studio

On Wed, Sep 3, 2008 at 6:14 PM, Mark Meijer <meijer78 <at> gmail.com> wrote:
3: Go the cygwin route and effectively turn my development environment
(as well as whatever environment my projects should run on) into unix,
and (presumably) don't use LuaBinaries. This is assuming it solves the
problems of both options 1 and 2, though I don't know that it actually
does.

Have you looked at Lua for Windows (http://luaforwindows.luaforge.net)? It has a lot of modules ready to be used.
--
Regards,
Ryan
RJP Computing
Mark Meijer | 4 Sep 10:50

Re: LuaRocks with Windows/Visual Studio

2008/9/4 RJP Computing <rjpcomputing <at> gmail.com>:
> Have you looked at Lua for Windows (http://luaforwindows.luaforge.net)? It
> has a lot of modules ready to be used.

I certainly have, I've been using it for a while already and I'm a fan
(thanks!). You're right, it does belong in that list of options, and
I'll likely stick to it for many things.

I was checking out LuaRocks, because I was looking to be able to use
some other modules that don't readily compile on Microsoft (or for
which I simply haven't taken the time yet to try), and also because
I'd like some of my stuff to be able to run on Linux as well. I wrote
the list of options with that in mind, and actually the rest of my
posts on this thread as well. It's mainly about Windows because that's
where the problems tend to rise :-P (although I haven't used LuaRocks
on Linux yet, I'm not anticipating a lot of problems there). LuaRocks
seems like it has the potential to eliminate some headaches in this
regard. It's not terribly important though, it's mostly hobby stuff
for myself. But that's just me.

I tend to have a critical view of things, and I may be pointing out
what I see as a potential problem, even though it may not be that big
of a problem for me personally. Hope nobody takes offense.

Cheers


Gmane