在Windows 10上使用MinGW编译zziplib库失败

今天好!

我在尝试使用MinGW编译zziplib-0.13.69 (http://zziplib.sourceforge.net/),因为我想使用Lua 5.3.5的LuaZip。我已经安装了依赖项zlib 1.2.3 (http://www.zlib.net/),幸运的是它有一个Windows安装程序。为了创建一个UNIX环境并使用提供的make文件,我使用msys.bat,进入源目录,然后通过以下命令设置zlib 1.2.3的路径:

    export CPATH="C:\Program Files (x86)\GnuWin32\src\zlib\1.2.3\zlib-1.2.3"

像往常一样,我接着运行:

    configure && make && make check && make install

然后在编译过程中一直生成以下错误:

checking CFLAGS for gcc -Wstrict-aliasing... -Wstrict-aliasing
checking CFLAGS for gcc -Warray-bounds... -Warray-bounds
checking CFLAGS making strings readonly... no, unknown
checking CFLAGS for strict prototypes... -Wstrict-prototypes
checking for pkg-config... no
configure: warning: pkgconfigdir=C:/mingw/lib/pkgconfig (see config.log)
configure: perhaps: make install pkgconfigdir=/
configure: warning: aclocaldir=C:/mingw/share/aclocal (see config.log)
configure: perhaps: make install aclocaldir=/mingw/share/aclocal
C:\MinGW\bin\sed.exe: -e expression #1, char 1: unknown command: `C'
configure: creating ./config.status
C:\MinGW\bin\sed.exe: -e expression #1, char 1: unknown command: `C'
config.status: creating Makefile
gawk: ./confjLOGyR/subs.awk:73: S["CFLAGS"]="   -fomit-frame-pointer -Wall -Wpointer-arith -Wsign-compare -Wmissing-declarations -Wdeclaration-after-statement -Werror-implicit-function-declarat"\
gawk: ./confjLOGyR/subs.awk:73:                                                                                                                                                                   ^ backslash not last character on line
C:\MinGW\bin\sed.exe: couldn't write 1 item to stdout: Invalid argument
config.status: error: could not create Makefile
C:\MinGW\bin\sed.exe: -e expression #1, char 1: unknown command: `C'
C:\MinGW\bin\sed.exe: -e expression #1, char 1: unknown command: `C'

我尝试了"在MinGW中编译zziplib"指南:http://itsacleanmachine.blogspot.com/2012/03/compiling-zziplib-with-mingw.html,但是错误仍然存在。我对编译一般不熟悉,请原谅我的无知。

提前致谢。

点赞