使用 MinGW 在 Windows 上编译 PDCurses

Compiling PDCurses on Windows with MinGW

我在构建 nmcurses-5.9 时执行 ./configure 时遇到最奇怪的错误

问题是当我尝试 运行

CC="gcc -m32" LD="ld -m32" ./configure \
--prefix=/mingw \
--without-cxx-binding \
--without-ada \
--enable-warnings \
--enable-assertions \
--enable-reentrant \
--with-debug \
--with-normal \
--disable-home-terminfo \
--enable-sp-funcs \
--enable-term-driver \
--enable-interop \
--with-pthread

我得到的错误是

./configure: line 21016: D:\Program: No such file or directory

那一行是

${MAKE:-make} preinstall

我正在使用 msys 在 MinGW 中构建它。 如有任何帮助,我们将不胜感激。

${MAKE:-make} preinstall 中,表达式 ${MAKE:-make} 扩展为 shell 变量 MAKE 的值,如果已设置,否则为 make.

所以 MAKE 被设置并扩展为 D:\Program Files\... 形式的东西, 即带有嵌入空间的路径,被解释为不同的标记 D:\ProgramFiles\... 由 shell 尝试执行 预期命令:

\path\to\make preinstall

相反,它尝试使用参数 Files\... preinstall 执行程序 D:\Program 并抱怨说不存在这样的程序。

使用 GNU autotools 建议将工具安装在没有 嵌入空间。