using gmp in visual studio?

Mike Mohr akihana at
Mon Jan 6 23:59:47 UTC 2014

Since GMP is written in C, you should be able to build the library with
mingw-w64 and link to it from the Visual Studio IDE. Since name mangling is
different between VS and GCC the C++ bindings will never work. Build the
DLL version with mingw-w64, generate an import library, and add that to the
VS link list. The GMP header may or may not work.

I can build and test such a library for you if you wish, but I will not do
it for free. Contact me off-list if you wish to discuss pricing.

On Jan 6, 2014 2:57 PM, "Torbjorn Granlund" <tg at> wrote:

> Adam Henderson <psyadam1 at> writes:
>   I tried to install gmp using cygwin and using the command "./configure".
>  I
>   got an error:
>   configure: error: could not find a working compiler, see config.log for
>   details
>   I noticed before the error it was trying to do a lot of "gcc <command>".
>   From my days at digipen, I remember that gcc stands for the gnu compiler.
>   Do I need to install the gnu compiler?  How do I get this to work?
> You need *some* C compiler to compiler this C library.
>   My other question is whether I use use gmp in visual studio.  I am
> worried
>   I might not be able to, since it says in the GMP basics that "All
> programs
>   using GMP must link against the libgmp library. On a typical Unix-like
>   system this can be done with ‘-lgmp’, for example".
> There is not support for any IDE "projects" in GMP.  You might have luck
> with a command-line version of Microsoft's C compiler.  (I have
> successfully done that in the past.)
> Since you're using cygwin, the simplest path is probably to install the
> required tools using the cygwin installer.
> Torbjörn
> Please encrypt, key id 0xC8601622
> _______________________________________________
> gmp-discuss mailing list
> gmp-discuss at

More information about the gmp-discuss mailing list