编译Lua 5.3 Mingw64 MSys2

时间:2015-07-08 11:57:09

标签: c++ windows lua mingw-w64

我按照说明从官方网站(http://mingw-w64.org/doku.php)安装了 mingw64 MSYS2 。为win7 PATH var添加了bin文件夹。一切似乎都有效。我从 MSYS2

运行此命令
gcc --version

它有效。

现在我正在尝试安装 Lua 5.3(来自lua.org的lua-5.3.1.tar.gz)。我使用WinRAR解压缩文件。从MSYS2,我转到我的Lua目录

cd /e/Programming/Libs/lua-5.3.1/

然后我运行make命令

mingw32-make mingw

但它不起作用。我收到了这条消息......

cd src && E:/Programming/mingw64/mingw64/bin/mingw32-make mingw
mingw32-make[1]: Entering directory 'E:/Programming/Libs/lua-5.3.1/src'
E:/Programming/mingw64/mingw64/bin/mingw32-make "LUA_A=lua53.dll" "LUA_T=lua.exe" \
"AR=gcc -std=gnu99 -shared -o" "RANLIB=strip --strip-unneeded" \
"SYSCFLAGS=-DLUA_BUILD_AS_DLL" "SYSLIBS=" "SYSLDFLAGS=-s" lua.exe
E:\Programming\mingw64\mingw64\bin\mingw32-make: invalid option -- =
E:\Programming\mingw64\mingw64\bin\mingw32-make: invalid option -- g
E:\Programming\mingw64\mingw64\bin\mingw32-make: invalid option -- u
E:\Programming\mingw64\mingw64\bin\mingw32-make: invalid option -- 9
E:\Programming\mingw64\mingw64\bin\mingw32-make: invalid option -- 9
E:\Programming\mingw64\mingw64\bin\mingw32-make: invalid option -- a
E:\Programming\mingw64\mingw64\bin\mingw32-make: unrecognized option '--strip-unneeded SYSCFLAGS=-DLUA_BUILD_AS_DLL SYSLIBS= SYSLDFLAGS=-s lua.exe'
Usage: mingw32-make [options] [target] ...

This program built for x86_64-w64-mingw32
Report bugs to <bug-make@gnu.org>
makefile:116: recipe for target 'mingw' failed
mingw32-make[1]: *** [mingw] Error 2
mingw32-make[1]: Leaving directory 'E:/Programming/Libs/lua-5.3.1/src'
makefile:55: recipe for target 'mingw' failed
mingw32-make: *** [mingw] Error 2

我不想下载Lua二进制文件,我想自己编译

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题。我看了看这个页面:

http://www.thijsschreijer.nl/blog/?p=863

我看到的是我的路径变量中没有c:\ mingw \ msys \ 1.0 \ bin。我在MinGW \ bin路径之后添加它,然后它工作正常。