Luarocks在构建luafilesystem时出现了错误。

我正在使用Luarocks2.2.0beta1在Windows 7上通过lua 5.2mingw安装luafilesystem。我收到了以下错误信息:

>luarocks install luafilesystem
Installing http://rocks.moonscript.org/luafilesystem-1.6.2-2.src.rock...
Using http://rocks.moonscript.org/luafilesystem-1.6.2-2.src.rock... switching to 'build' mode
mingw32-gcc -O2 -c -o src/lfs.o -IC:/lua/include/src/lfs.c
mingw32-gcc -shared -o lfs.dll src/lfs.o C:/lua/bin/lua52.dll -lm
C:\lua\bin\lua52.dll: file not recognized: File format not recognized
collect2.exe: error: Id returned 1 exit status

Error: Build error: Failed compiling module lfs.dll

有什么方法可以修复这个问题吗?

注意:到目前为止,我没有安装其他与luafilesystem没有依赖关系的luarocks模块的问题。

点赞
用户4090397
用户4090397

解决了,这个问题是因为我在构建 lua52.dll 时实际上没有使用相同的 MinGW 编译器。我不知道我第一次使用的是哪个编译器。感谢 @siffiejoe。

2015-01-09 05:00:11