Re: ‘mpq_cmp_z’ was not declared in this scope

Rafael Guglielmetti rafael at rgug.ch
Thu Aug 25 11:00:36 UTC 2016


Thanks, I'll have a look!

On 22/08/16 22:59, Marc Glisse wrote:
> 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.
>



More information about the gmp-bugs mailing list