Building the GNU MP Library on Windows Install MSYS2.
On a 64-bit computer, install msys2-x86_64-20161025.exe, and on a
32-bit computer, install msys2-i686-20161025.exe. You can also check
for a more recent version of MSYS2 here. Install MSYS2 to its default
location.
After installation, you need to updates MSYS2 packages. From the
Windows Start Menu, start MSYS2 MSYS. In the shell command window,
enter the command:
pacman -Syuu
and follow instructions. You will have to close the command window,
reopen a new one, and reenter the command pacman -Syuu.
Finally, in order to build software, you need to install a number of
packages with the command:
pacman -S --needed base-devel mingw-w64-i686-toolchain
mingw-w64-x86_64-toolchain git subversion mercurial
mingw-w64-i686-cmake mingw-w64-x86_64-cmake
run from the same command window as in the previous step.
To build 32-bit software, use the MSYS2 MinGW 32-bit command from the
Windows Start Menu, and for 64-bit software, use MSYS2 MinGW 64-bit.
Install yasm.
On a 64-bit computer, copy yasm-1.3.0-win64.exe to C:\msys64\usr\bin,
and rename it to yasm.exe.
Similarly on a 32-bit computer, copy yasm-1.3.0-win32.exe to
C:\msys32\usr\bin, and rename it to yasm.exe.
Build GNU MP.
Create folders C:\Temp\x86 and C:\Temp\x64. These are the folder where
the compiled 32-bit and 64-bit versions of GNU MP will be installed.
Unzip gmp-6.1.2.tar.bz2 in folder C:\Temp. This puts GNU MP in
subfolder gmp-6.1.2.
In each one of the command windows openend with the commands MSYS2
MinGW 32-bit and MSYS2 MinGW 64-bit from the Windows Start Menu, run
the commands below:
cd /c/Temp/gmp-6.1.2 ./configure --enable-fat --disable-static
--enable-shared --prefix=/c/Temp/x86 or x64 make make check make install
The --prefix specifies the install folder. Note that the Windows C:
drive is specified as the root /C/ folder in the MinGW window. Note
also that the configure and make commands are to be run against a
fresly uncompressed GNU MP source. The make install command creates
libgmp-10.dll in the C:\Temp\x86 and C:\Temp\x64 folders. These two
compiled versions of the GNU MP library are to be copied to the x86
and x64 folders of the Math.Gmp.Native Visual Studio projects. They
can also be copied directly into the x86 and x64 folders of the
bin/Debug or bin/Release folders.
The 32-bit and 64-bit make check commands generate some warnings, but
all tests passed successfully.