2

我正在尝试使用 MinGW 的 MSYS 在 Windows 7 上编译 GDC (v2) 。

当我到达这一步时:

$ ../configure --enable-languages=d --disable-shared --disable-bootstrap

我得到:

checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking target system type... i686-pc-mingw32
checking for a BSD-compatible install... /bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... yes
checking for correct version of mpfr.h... no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.2+.

尝试使用 --with-gmp 和/或 --with-mpfr 选项来指定它们的位置。

这些库的源代码的副本可以在它们各自的托管站点以及ftp://gcc.gnu.org/pub/gcc/infrastructure/上找到。另请参阅http://gcc.gnu.org/install/prerequisites.html了解更多信息。如果您从供应商分发包中获得 GMP 和/或 MPFR,请确保您已经安装了库和头文件。它们可能位于单独的包中。

这让我回顾了指令,其中指出它需要这些库:

  • libgmp3-dev
  • libmpfr-dev
  • libmpc-开发

所以现在的问题是,我在哪里可以找到这些头文件和/或库?我到处搜索 libgmp3-dev,但找不到任何适用于 Windows 的东西。(我还在学习*nix,所以我对任何东西都不太熟悉。)

谢谢!


更新

所以我尝试了makeMPFR(我什至不知道它是否是正确的版本),我得到了这个错误:

$ make install
Making install in tests
[...]
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
 /bin/sh ./libtool   --mode=install /bin/install -c   libmpfr.la '/usr/local/lib'
libtool: install: /bin/install -c .libs/libmpfr.lai /usr/local/lib/libmpfr.la
libtool: install: /bin/install -c .libs/libmpfr.a /usr/local/lib/libmpfr.a
libtool: install: chmod 644 /usr/local/lib/libmpfr.a
libtool: install: ranlib /usr/local/lib/libmpfr.a
/bin/sh: /home/Home: No such file or directory
make[2]: *** [install-libLTLIBRARIES] Error 127
make[2]: Leaving directory `/home/Home User/mpfr-2.4.2'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/Home User/mpfr-2.4.2'
make: *** [install-recursive] Error 1

有任何想法吗?

4

4 回答 4

0

http://gmplib.org/

http://www.mpfr.org/

只需下载源压缩包。至于构建这些,我不记得细节(说明应该很清楚),但我知道您可以将这些 GMP 和 MPFR 放在带有 GCC 的源代码树中,并且 GCC 构建过程将自动负责构建这些。这可能比为它们构建/安装/设置环境变量作为一个离散步骤更容易。

于 2011-03-02T21:30:47.753 回答
0

我总是用它在 Windows 上构建 gdc:http: //gladman.plushost.co.uk/oldsite/computing/gmp4win.php

于 2011-03-03T09:17:57.763 回答
-1

您发布的错误消息包含查找库的链接。您可能需要下载它们的源代码并编译它们,但它们都很容易构建。

于 2011-03-02T20:22:33.333 回答