Installing GMP on OS X 10.3.x

Sisyphus sisyphus1 at optusnet.com.au
Thu Aug 4 03:44:03 CEST 2005


----- Original Message ----- 
From: "Amit Bhatia"

> How can I check what version is installed?

D:\C>cat try.c

#include <stdio.h>
#include <gmp.h>

int main (void)
{
printf("%s\n", gmp_version);
return 0;
}

D:\C>gcc -o try.exe try.c -lgmp

D:\C>try.exe
4.1.4

(I think gmp_version is a fairly recent addition to GMP. If that script
won't compile because 'gmp_version' does not exist in your version of GMP,
then it probably means that your version of GMP is too old.)

Some of the other requirements look a bit worrying too, even if you do
have a sufficiently recent version of GMP:

  2 .. the GMP C++ interface has to be compiled with the same compiler
version with which you will compile the PPL;
  3.. your C and C++ compilers and your linker have to find that version of
GMP (and not other versions that may be present in your system).

It might well be simpler for you to build GMP yourself from source.

Cheers,
Rob



More information about the gmp-discuss mailing list