lua-users home
lua-l archive

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


On 1/4/2018 6:01 PM, steve donovan wrote:
On Thu, Jan 4, 2018 at 9:47 AM, KHMan wrote:
You should try it on a compiler for which something like this have worked
for you in the past.

Which BTW, makes it very hard for LuaRocks to deliver binary rocks on Windows.

So this did not work:

C:\###\source>luarocks install luafilesystem
Installing https://luarocks.org/luafilesystem-1.7.0-2.src.rock

...

link -dll -def:lfs.def -out:lfs.dll C:/Program Files (x86)/PUC-Lua/5.3.4/x86/lua53.dll src/lfs.obj

...

C:\Program Files (x86)\PUC-Lua\5.3.4\x86\lua53.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x448

I'm surprised nobody using LuaRocks have chimed in. So nobody uses Visual Studio for LuaRocks? One would think a linking step should work fine assuming forward compatibility, _if_ somebody had used it before...

There are so many variants - generally the GNU toolchain is better
because it doesn't change its runtime every year.

It would take an heroic effort to do this - though I think LuaDist is
onto something good - Peter Drahos builds EVERYTHING (including C
dependencies) using CMake.

His 'batteries' mini-distribution is a worthy successor for Lua for Windows.

Solution: Forget the C compilers. Distributions or modules should not need to use a C compiler. Which leads to the age-old issue of manpower, ha ha.

Or do it the ESP8266 way, distribute a Linux VM image with a cross-compiler targeting Windows and everything for a Lua distro loaded. Solves the "installing a suitable C compiler" problem.

--
Cheers,
Kein-Hong Man (esq.)
Selangor, Malaysia