【发布时间】:2015-03-06 15:16:17
【问题描述】:
我正在使用 Luarocks 2.2.0beta1 在带有 lua 5.2 和 mingw 的 windows 7 上安装 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 的其他模块时没有问题。
【问题讨论】:
-
这些行之前是什么?
-
可能是 32 位到 64 位的问题。您是否使用与您现在尝试使用相同的 MinGW 编译器自己编译
lua52.dll? -
@EtanReisner 我已经写完全文了
-
@siffiejoe 是的,我使用相同的 mingw 编译器编译它。我尝试过使用其他编译器的 dll,但它也不起作用。