Re: ‘mpq_cmp_z’ was not declared in this scope
Marc Glisse
marc.glisse at inria.fr
Mon Aug 22 20:59:35 UTC 2016
On Tue, 16 Aug 2016, Rafael Guglielmetti wrote:
> I downloaded GMP 6.1.1 from the website, and configured and built it via:
> ./configure --prefix=/usr -enable-cxx
Using --prefix=/usr on Ubuntu seems like a bad idea (except when building
a .deb).
> make
> sudo make install
>
> When trying to #include <gmpxx.h>, I get the following errors:
> /usr/include/gmpxx.h: In static member function ‘static int
> __gmp_cmp_function::eval(mpq_srcptr, mpz_srcptr)’:
> /usr/include/gmpxx.h:893:26: error: ‘mpq_cmp_z’ was not declared in this
> scope
> { return mpq_cmp_z(q, z); }
> ^
Most likely your compiler is picking up an old gmp.h (try compiling
with g++ -E to see which gmp.h is used), either in /usr/local/include or
in /usr/include/x86_64-linux-gnu.
--
Marc Glisse
More information about the gmp-bugs
mailing list