[英]Error when installing GMP on Windows with MinGW
我在WinLibs提供的帶有 MinGW 的 Windows10 上。
我嘗試使用GMP Install Instruction for Windows Platform的說明安裝 GMP 庫。
我做過這些
C:/mingw64
中安裝 MinGWC:/MSYS/1.0
中安裝 MSYSD:/desktop/gmp-6.2.0
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 后,安裝后腳本的自動運行失敗,我只是忽略了它。
在我手動運行postinstall.bat
,GMP 庫按需要編譯。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.