2016-04-18 78 views
1

我試圖在運行Windows 10的PC上用MinGW軟件構建GCC-5.3.0。 我得到這個錯誤MinGW:構建GCC需要GMP 4.2+,MPFR 2.4.0+和MPC 0.8.0+

configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 
0.8.0+. 
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify 
their locations. Source code for these libraries can be found at 
their respective hosting sites as well as at 
ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also 
http://gcc.gnu.org/install/prerequisites.html for additional info. If 
you obtained GMP, MPFR and/or MPC from a vendor distribution package, 
make sure that you have installed both the libraries and the header 
files. They may be located in separate packages. 

我的投入是

[email protected] /d/gnu/gcc-5.3.0-build 
$ ../gcc-5.3.0/configure --target arm-eabi --enable-win32-registry=My 
ToolchainName --prefix /f/gnu/out/ --enable-languages=c,c++ --disable 
-nls --disable-shared --with-newlib --with-headers=../newlib-2.4.0/ne 
wlib/libc/include 

注:/ d /路徑作爲我的d:/驅動器

我已經在環境變量中添加的路徑

D:\MinGW\bin 

我已經安裝了libgmp 5.1.2,libmpfr 3.1.2和1.0.2 libmpc從MinGW的安裝管理器

我跟着從http://gnutoolchains.com/building/指導,以構建在Windows

+0

錯誤消息是不言自明:你需要通過'--with- *'選項來提供路徑所需的庫,例如'--with- GMP =/d /路徑/到/ gmp'。 –

+0

謝謝。我已經發現,我沒有gmp.h文件,所以我不得不建立自己的GMP – prouser135

+0

移動我的評論回答。 –

回答

0

下載多個庫包構建並將它們安裝到例如/ C/GNU一個新文件夾/安裝

gmp-6.1.2.tar.bz2 
mpfr-3.1.5.tar.bz2 
mpc-1.0.2.tar.gz 

1>構建GMP

cd gmp-6.1.2 
configure --prefix=/c/gnu/install/ 
make -j4 install 

2>構建MPFR

cd mpfr-3.1.5 
configure --prefix=/c/gnu/install/ --with-gmp=/c/gnu/install/ --enable-static --disable-shared 
make -j4 install 

3> Build mpc

cd mpc-1.0.2 
configure --prefix=/c/gnu/install/ --with-gmp=/c/gnu/install/ --with-mpfr=/c/gnu/install/ --enable-static --disable-shared 
make -j4 install 

然後配置建設與海灣合作委員會的選項:

--with-gmp=/c/gnu/install/ --with-mpfr=/c/gnu/install/ --with-mpc=/c/gnu/install/ 
0

錯誤消息我自己的GNU工具鏈是不言自明的:你需要提供路徑所需圖書館通過--with-*選項,如--with-gmp=/d/path/to/gmp