compiling gmp on windows......

Sisyphus sisyphus1 at
Wed Aug 20 09:01:06 CEST 2008

----- Original Message ----- 
From: "Mohan gupta" <mohangupta13 at>
To: <gmp-discuss at>
Sent: Tuesday, August 19, 2008 5:43 AM
Subject: compiling gmp on windows......

> hello everyone ,
> i used gmp on linux for my project and it did wonders but now i want to 
> port
> my project to windows but i have no idea of compiling libraries on 
> windows.
> can anyone please tell me how to compile gmp on windows xp/vista ,,and how
> to compile my project on windows which uses gmp.....

On Windows XP/Vista, if you build the gmp library in the (freely available) 
MSYS shell, using the (freely available) MinGW port of gcc/g++, then you do 
it the same way as on linux (assuming you used gcc/g++ on linux).

Once the library has been built, you can build and run your projects 
(essentially the same as on linux) in either the MSYS shell or the cmd.exe 
shell. In the MSYS shell, when building your projects, you may need to 
additionally specify the '-I/usr/local/include' and '-L/usr/local/lib' 
switches - which is probably something you didn't have to do on linux. In 
the cmd.exe shell those switches will change to something like 
'-IC:/msys/1.0/local/include' and '-LC:/msys/1.0/local/lib', depending on 
exactly where you install MSYS.


More information about the gmp-discuss mailing list