Installing GMP on OS X 10.3.x
Hans Aberg
haberg at math.su.se
Thu Aug 4 16:08:39 CEST 2005
I checked this under Mac OS 10.4.2 with basic Fink installed and
nothing else, and it seems to work. It should be easier under Mac OS
10.3.9, as then there is only one compiler GCC 3, available. (Mac OS
10.4 is said to be compiled with GCC 3, but has GCC 4 installed.) I
have a .xinitrc file with the line
. /sw/bin/init.sh
added in the beginning, which adds the Fink /sw/ directories front in
the filepaths. So if you do that, I guess it might work.
On 4 Aug 2005, at 03:44, Sisyphus wrote:
>
> ----- Original Message -----
> From: "Amit Bhatia"
>
>
>> How can I check what version is installed?
>>
>
> D:\C>cat try.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
gcc -o try.o try.c -lgmp
>
> D:\C>try.exe
./try.o
> 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).
This is because, unlike C, there is no C++ standardized object code
format. And I think it may have changed from GCC 3 to 4. But if you
only have GCC 3 present, this will perhaps not be a problem.
Hans Aberg
More information about the gmp-discuss
mailing list