GMP-4 installation on windows

delta trinity deltatrinity at
Mon Dec 8 12:45:41 CET 2003


Actually, there's a few way to acomplish this.

First, you can compile it for your intended platforms.  For that, the 
easiest way is to download MinGW and MSYS (  Install MinGW, 
then MSYS.  MinGW is a GCC compiler environment for windows.  And MSYS is 
kind of a unix shell emulator, which is required to execute the GMP 
configuration script.  From there, you can compile it as explained in GMP 
manuals, it's pretty straightforward.  For example, if you intend to use it 
on a PentiumII, you can specify GMP to compile with optimization specific to 
PentiumII.  If you don't know in advance on what processor it will be run, 
you can tell it to compile for a common ancestor (386, 486 or Pentium code 
for example), which will run on any higher processor, but will not have the 
specific optimizations that the newer processor can offer.  Or, again, you 
may build several target processor and choose at runtime which one to use.  
I heared that the intent is for the next version of GMP to perform this last 
step by itself.

Probably the best option is to create the 'shared' version of GMP (i.e. the 
'DLL' version), as opposet to the 'static' version.  Static and shared 
version are in essence the same build, just that one reside inside a DLL, 
which applications can link to, the other is in a library that must be 
linked at compile time.  Some say that they preffer static build because 
they assume that it provide faster functions call.  Honestly, the only 
difference is that in a DLL, there is usually just one extra JMP 

The second option, if you dont want to get your hands dirty with all the 
compilation stuff is to find a pre-compiled DLL of the latest version of 
GMP.  It happen that I too did all the trial and error of compilations to 
finally arrive at producing a DLL (remember that it's not always trivial for 
us, Windows users, who are used to user-friendly interfaces, to understand 
the basics of running stuffs in a unix environment, like shell scripts, 
...)!  And so, to save the trouble to other people (which is less of a 
trouble now by using step 1), I built and distributed the shared version 
(DLL) of GMP optimized for the different x86 processors on my FTP site.

In both cases, you'll probably need to generate some intermediate files to 
compile and link to the DLL.  For example, some popular C/C++ compilers need 
a .lib, which can be derived with their proper set of tools from the .dll.

Good luck

>From: Python <Python at>
>To: gmp-discuss at
>Subject: GMP-4 installation on windows
>Date: Sun, 07 Dec 2003 23:51:02 -0700
>This is my first question and I hope someone can help me out. Where can
>I find a win32 binary install for WinXP? If it's not there, how do I
>install GMP-4 on windows?
>I'm eventually wanting to install GMPY for my work in Python.
>Thank you...
>gmp-discuss mailing list
>gmp-discuss at

Wonder if the latest virus has gotten to your computer? Find out. Run the 
FREE McAfee online computer scan!

More information about the gmp-discuss mailing list