运行 Windows 中的自动工具 (MinGW)

Running autotools in Windows (MinGW)

我正在尝试在 Windows 上构建 shapelib from source。该库使用自动工具。我安装了带有适当软件包的 MinGW。当我运行

C:\MinGW\msys.0\bin\sh autogen.sh

它输出

autogen.sh: line 4: readlink: command not found
autogen.sh: line 4: dirname: command not found
**Error**: Directory `' does not look like the top-level package directory

我不希望阅读链接与 Windows 一起使用,所以我直接跳到

C:\MinGW\msys.0\bin\sh configure

但是,这也会引发错误

configure: line 478: sed: command not found
configure: line 477: expr: command not found
configure: line 478: sed: command not found
configure: line 492: sed: command not found
: error: cannot create .lineno; rerun with a POSIX shell

是否有希望在 windows 上进行编译?我错过了一些明显的东西吗?我仔细检查并安装了 sed 包。

问题已解决。我的 MinGW 安装已损坏。我删除了 MinGw 并重新安装了它。现在 autogen.sh 运行良好。