首页 > 解决方案 > 无法在 Windows 10 上使用 MinGW 编译 zziplib 库

问题描述

再会

我正在尝试使用 MinGW 编译 zziplib-0.13.69 ( http://zziplib.sourceforge.net/ ),因为我想将 LuaZip 用于 Lua 5.3.5。我已经安装了依赖 zlib 1.2.3。( http://www.zlib.net/ ),幸好有一个 Windows 安装程序。为了创建 UNIX 环境并使用提供的 make 文件,我使用 msys.bat,cd 到源目录,然后通过以下方式设置 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 不幸的是,错误仍然存​​在。一般是编译新手,所以请原谅我的无知。

提前致谢。

标签: cluacompiler-errorswindows-10mingw-w64

解决方案


推荐阅读