Luarocks错误构建luafilesystem

Luarocks错误构建luafilesystem,lua,mingw,luarocks,Lua,Mingw,Luarocks,我正在使用Luarocks 2.2.0beta1在windows 7上安装Lua5.2和mingw的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...

我正在使用Luarocks 2.2.0beta1在windows 7上安装Lua5.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
你知道怎么解决这个问题吗


注意:到目前为止,我在安装其他带有Luarock的模块时没有遇到任何问题,这些模块与luafilesystem没有依赖关系。

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

这些行前面是什么?可能是32位到64位的问题。您是否使用与您现在尝试使用的相同的MinGW编译器自己编译了
lua52.dll
now@siffiejoe是的,我用同一个mingw编译器编译了它。我试过使用其他编译器中的dll,但它也不起作用。注意,您可以使用类似CFF Explorer或任何PE二进制解析器(例如objdump、nm或dumpbin)的东西来识别dll的位格式。