gmp 4.3.0: minor bug with gmp_version

Paul Zimmermann Paul.Zimmermann at loria.fr
Sun Apr 26 09:51:16 CEST 2009


       Heinz,

> after installing new 4.3.0 on my Linux x86_64 system I found:
> 
> std::cout << "Version : " << gmp_version << std::endl;
> ===> 4.2.2
> 
> std::cout << "Version : ";
> std::cout << __GNU_MP_VERSION << ".";
> std::cout << __GNU_MP_VERSION_MINOR << ".";
> std::cout << __GNU_MP_VERSION_PATCHLEVEL << std::endl;
> ===> 4.3.0
> 
> same for the C-only version. Just a small bug. But normally I am using
> gmp_version, so initially I had doubts, whether installing 4.3.0 fails
> or not:-)

my guess is that you are linking dynamically against an older version of
libgmp.so installed on your system. Please try to link statically to GMP,
or to update your LD_LIBRARY_PATH.

By the way it is a good idea in any application using GMP to check that
gmp_version (from libgmp) matches GNU_MP_VERSION (from gmp.h). Maybe GMP
itself could provide a function doing that check?

Paul Zimmermann


More information about the gmp-bugs mailing list