intalling GMP

delta trinity
Wed, 18 Dec 2002 12:00:08 -0500

To compile, you need at least an assembler except if you want to build with 
generic c code (may be highly optimized c code but nowhere as fast as 
assembler).  Some of the modules are pure assembler (.asm).  I don't know 
how your C compiler can handle this.

Then, you have to create the source code structure for your intended target 
(does it use assembler, what processor will it run on, ex: 68000 or higher 
processors).  You can't just take the distributed source code and compile it 
right away.  For that, you have tree choices:

1 - You build up the correct structure manyally (long and then, if you want 
another target, this is to start over again).

2 - You run the 'cunfigure' utility script with the correct parameters for 
your target, provided that your MacOS can understand unix shell scripts 
(Does MacOS support this?  I realy don't know anything about MACs :-( )

3 - You use some sort of unix emulator and then, go to the directory where 
'configure' file is in and type 'sh ./configure <parameters>'.  You may be 
able to find such emulators for free as unix stuffs tend to be widely open 

I compiled shared library (.dll) under Windows with an emulator called 

This process will give you the correct structure needed to compile (move 
some assembler files from targets directory to the compile directory and 
create the 'gmp.h').

Then, you'll need to compile it with some version of GCC (a widely used 
open-source C compiler) and assembler.  You just run the make utility (which 
use the 'makefile' and call GCC to compile the stuff).  Here also, I used a 
package called MinGW (to build under Windows).

This info may not be enough to actually get you through the installation but 
at least, it should give you an idea of what is to make.  Don't worrk, it 
took me at least a week to figure all of this.  I'm affraid that in this 
world, there's no simple 'click here and it's installed' buttons.  It may be 
a bit hard at first but it is worth the effort ;-).  Keep in mind that GMP 
is built to be cross-platforms and so, can not necessarely use the simple 
installations and interface (bells and whistle) of a specific interface :-)

In any case, whatever way you take for compiling it, when you succeed, 
please post the info!  It may not be the 'best' way but as long as you get 
to the final result, that what's counting :-)

As the author said, you should watch for installation or runtime problems as 
being widely cross-platformed, and with all the revisions released, there 
may still be issues for some user specific platforms/targets.  It's more our 
responsibility to report those (and possible suggestions to fix issues).

So, good luck!


>My name is Jeremy Lezniak and I have a question about installing GMP.  I'm
>running on Mac OS 8.6 and was wondering if there is a way I can use GMP on 
>system (my c++ compiler is Metroworks codewarrior).  I've taken a 
>worth of c++ programing, and after going through all the literature of
>installation, I understood next to none of it (I'm a mathematics student, 
>a computer programmer).  I really like the speed in which GMP is clocked at
>doing many relavent calculations...but GMP does me no good as a 
>if I don't understand how to use it.  So could you throw some advice my 
>Thank you very much for your time, sincerely,
>Jeremy Lezniak

The new MSN 8: smart spam protection and 2 months FREE*