[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Need some help with Luarocks please
- From: Thijs Schreijer <thijs@...>
- Date: Mon, 21 Dec 2015 22:01:36 +0000
> -----Original Message-----
> From: email@example.com [mailto:firstname.lastname@example.org] On
> Behalf Of Geoff Smith
> Sent: maandag 21 december 2015 19:33
> To: Lua mailing list
> Subject: Re: Need some help with Luarocks please
> Hi Thijs
> Thanks for trying to help me solve this problem.
> I forgot to mention I am using luarocks-2.2.3-win32
> I tried reinstalling Luarocks with the command install /F /LV 5.1 /MSVC
> the MSVC switch doesnt seem to expect a param to point at the specific VS
> compiler, and it didnt prompt me to pick one during the install process.
> It seemed to reinstall OK though.
The /MSVC switch tells the installer to NOT scan the system for a VC version to use. If you have multiple, it might pick the one you don't want.
The requirement then becomes that you run LuaRocks from within the VS commandshell, or manually call the VCVARSALL.bat batch file.
> I then tried running the command shell from my VS 2013 IDE. I get
> C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE>"C:\Program
> Files (x86)\LuaRocks"\luarocks install luafilesystem
> Installing https://luarocks.org/luafilesystem-1.6.3-1.src.rock...
> Using https://luarocks.org/luafilesystem-1.6.3-1.src.rock... switching to
> 'build' mode
> cl /nologo /MD /O2 -c -Fosrc/lfs.obj -IC:/Program Files
> (x86)/Lua/5.1/include/ src/lfs.c lfs.c
> link -dll -def:lfs.def -out:lfs.dll C:/Program Files
> (x86)/Lua/5.1/lua5.1.dll src/lfs.obj
> Microsoft (R) Incremental Linker Version 12.00.31101.0
> Copyright (C) Microsoft Corporation. All rights reserved.
> C:\Program Files (x86)\Lua\5.1\lua5.1.dll : fatal error LNK1107: invalid or
> corrupt file: cannot read at 0x2B8
> Error: Build error: Failed compiling module lfs.dll
> Basically the same error. It seems to compile OK but I still get the failure
> at Link time.
> Any further ideas how to solve this please ?
Make sure you have the Lua libraries compiled with the same compiler/runtime. Hence the link I included to LuaWinMake, which does the hard work for you. LuaWinMake can also install Lua in the proper structure for you.
The really lazy option would be to use LuaWinMulti, calling it with;
make --51 install c:\lua
Will download lua 5.1 (or 52 or 53) sources, compile and install it in 'c:\lua`, and download and install luarocks there too.
As long as your compiler is in your system path when you call it, it will automatically use the right compiler (MS or MinGW toolchains)