A small tip outside my expertise, enjoy.

For building GMP (GNU Multiple Precision Arithmetic Library, http://gmplib.org) under Windows you can follow theses easy step;

- Get latest GMP [source][1].

- Create a folder to store your GMP's library (example C:\gmp)

- Get [MinGW][2].

- Do a full install of MinGW. (+-400m)

- Run msys.bat from C:\MinGW\msys\1.0 if you installed in the default directory.

- Run ./configure --prefix=/c/GMP --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 -disable-static --enable-shared. Please note there I didn't used --enable-cxx as the c++ module does not seem to compile well with the new GMP's library. (It reference inttypes.h that mingw can't find)

- Run make

- Run make install

-Run dumpbin /exports libgmp-10.dll >libgmp-10.exports

-Edit the file libgmp-10.exports to leave there only the function name.

-Run lib /def:libgmp-10.def /out:libgmp-10.lib

and voila, you are done.

You will have a .h and a .lib library that you can link to Visual Studio like a .lib.

[1]: http://gmplib.org
[2]: http://sourceforge.net/projects/ming

Next Post Previous Post