已经安装了mpc mpfr 和gmp怎么configure gcc还是显示,再次配置时已经with了这三个
checking for the correct version of gmp.h... yes
checking for the correct version of mpfr.h... yes
checking for the correct version of mpc.h... yes
checking for the correct version of the gmp/mpfr/mpc libraries... no
configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations.
GCC是11.2.0
mpc1.0.3
mpfr4.1.0
gmp6.1.2
=============
网上找到一个类似问题
https://stackoverflow.com/questions/3508495/gcc-cant-find-gmp-mpfr-and-mpc-libraries
【已解决】
要在mpfr.h里面补上
#define mpfr_add_one_ulp(x,r) \
(mpfr_sgn (x) > 0 ? mpfr_nextabove (x) : mpfr_nextbelow (x))
#define mpfr_sub_one_ulp(x,r) \
(mpfr_sgn (x) > 0 ? mpfr_nextbelow (x) : mpfr_nextabove (x))
--
修改:shrine08 FROM 180.119.160.*
FROM 180.119.160.*