【发布时间】:2020-06-24 09:50:09
【问题描述】:
我正在使用 WinLibs 提供的 MinGW 的 Windows10。
我尝试按照GMP Install Instruction for Windows Platform 的说明安装 GMP 库。
这些我都做了
- 在
C:/mingw64中安装MinGW - 在
C:/MSYS/1.0中安装 MSYS - 下载GMP源码并解压到
D:/desktop/gmp-6.2.0 - 运行 MSYS 和
cd进入D:/desktop/gmp-6.2.0 - 运行
./configure --prefix="D:/GMP" --disable-static --enable-shared。这样就成功生成了Makefile,并在控制台中显示了这些信息:
configure: summary of build options:
Version: GNU MP 6.2.0
Host type: skylake-pc-mingw32
ABI: 64
Install prefix: D:/GMP
Compiler: gcc
Static libraries: no
Shared libraries: yes
- 运行
make。进程因这些错误信息而失败
In file included from set_str.c:57:
set_str.c: In function '__gmpf_set_str':
../gmp-impl.h:4435:29: warning: implicit declaration of function 'localeconv' [-Wimplicit-function-declaration]
4435 | #define GMP_DECIMAL_POINT (localeconv()->decimal_point)
| ^~~~~~~~~~
set_str.c:132:24: note: in expansion of macro 'GMP_DECIMAL_POINT'
132 | const char *point = GMP_DECIMAL_POINT;
| ^~~~~~~~~~~~~~~~~
../gmp-impl.h:4435:41: error: invalid type argument of '->' (have 'int')
4435 | #define GMP_DECIMAL_POINT (localeconv()->decimal_point)
| ^~
set_str.c:132:24: note: in expansion of macro 'GMP_DECIMAL_POINT'
132 | const char *point = GMP_DECIMAL_POINT;
| ^~~~~~~~~~~~~~~~~
make[2]: *** [set_str.lo] Error 1
make[2]: Leaving directory `/d/Desktop/gmp-6.2.0/mpf'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/d/Desktop/gmp-6.2.0'
make: *** [all] Error 2
- 我应该运行
make install来完成安装,但由于最后一步失败,我不能。
这里有什么问题?我该如何解决?
【问题讨论】:
-
既然已经安装了MSYS,为什么不安装它提供的GMP包呢?
-
否则,它看起来像是某个地方的错误,configure 应该检测 localeconv 是否可用,并且只有当 configure 说是时才会启用失败的代码。
-
@Marc Glisse:CMP 是否与 MSYS 一起提供?我在安装 MSYS 的过程中没有任何选项。
-
msys2.org "MSYS2 是一个软件发行版",它是一个包管理器。所以一旦安装,你就可以用它来安装其他软件了。
-
@Marc Glisse:好的,我去看看。谢谢。