lua-users home
lua-l archive

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


In article
<9034825D2909FB4E96D539B3DE2E7E2AAB7A0DF9@E2010-MBX04.exchange2010.nl>, Thijs
Schreijer <thijs@thijsschreijer.nl> wrote:
> > -----Original Message----- From: lua-l-bounces@lists.lua.org
> > [mailto:lua-l-bounces@lists.lua.org] On Behalf Of Michael Gerbracht Sent:

> > [...] Can you suggest what I have to do to get it working? I have seen
> > that you can download lpeg sources - do I have to compile them? Is it
> > possible to use Visual Studio for that? Or is there a place I can
> > download another version of .dll? I have no experience with compiling C
> > programs...

> I'm not very knowledgeable about loading dll's dynamically from
> applications and what stuff is required to make that work but there are at
> least 2 important things to keep in mind;
> 1) the modules loaded should be compiled for the same architecture (x64 in
> your case)
> 2) they must be compiled against the same 'runtime'

Ok, thanks, that's a good point.

> The second might not make sense to you so here it goes; All Microsoft C/C++
> compilers compile the source code against a specific runtime. The runtimes
> used are usually called MSVCRT.dll, MSVCR10.dll (at least for 32bit). [...]
> So what to do? 1) Download an application called "DependencyWalker" (google
> it) using that you can find out what runtime NLua was built against.

Ok, I had a look using DependencyWalker: NLua is compiled against
MSCOREE.dll. The corresponding lua.dll is complied against MSVCR110.

> 2) For compiling I would use LuaRocks, it will do the heavy lifting for
> you. But you will need to configure it for the correct runtime and
> architecture. LuaRocks depends on a compiler you must have installed, for
> MSVCRT dependencies I would use MinGW, for the other ones probably best to
> stick with the Microsoft compilers (either a Visual Studio Express version,
> or in the Windows SDK)

Ok, thank you very much, I will have a look at LuaRocks and try to compile
lpeg.

Thanks for your help!
Michael