First, install some basic GNU utilities via MinGW. We need tar
. Then, download a stable lzip release. Choose tarball not lzip archive, because we want to build lzip. Now, open your MSYS shell, go to directory made after extracting lzip tarball (this directory should be available as /c/<PATH ON C DRIVE WITH BACKSLASHES REPLACED WITH SLASHES>
) and run:
./configure --prefix=/
make
make install
Then go up (cd ..
) and run:
tar xvf gmp-6.1.0.tar.lz
It should extract this file. Now, build GMP by going to directory gmp-6.1.0
and running:
PATH="/c/Program Files/CodeBlocks/MinGW:$PATH" ./configure --prefix='/c/Program Files/CodeBlocks/MinGW'
on 32-bit system, or:
PATH="/c/Program Files (x86)/CodeBlocks/MinGW:$PATH" ./configure --prefix='/c/Program Files (x86)/CodeBlocks/MinGW' --enable-cxx
on 64-bit. Run these commands:
make
make install
You should have GMP installed.