views:

1574

answers:

3

Is there an easy way to build the GMP (GNU Multiple Precision Arithmetic Library, http://gmplib.org) under Windows, using Visual Studio 2005? I tried to find information about building the library myself, but could not find anything that really helped me. I'm not very experienced with building libraries myself (I've managed to build boost, but that's about it).

Or is there a stable (pre-built) GMP distribution that I'm unaware of?

Is MPIR a valid alternative (http://www.mpir.org)? Comment about MPIR on the GMP site: This "angry GMP fork" might be an alternative to the real GMP for some Windows users, but they'll have to deal with lots of anti-GMP sentiments.

Edit: The MPFR C++ wrapper page contains information/links to GMP/MPFR solutions for Visual Studio and compiled gmp/mpfr libraries as well: http://www.holoborodko.com/pavel/?page_id=12

+1  A: 

Have you seen these?

Building GMP and MPFR with Microsoft Visual Studio 2008 and YASM

GMP Install Instruction for Windows Platform

Mitch Wheat
thanks for those, the first one worked for me, though I had to fix a few python scripts that allowed to convert the VS2008 project/solution files to VS2005 files. Also, I found the following MPFR wrapper very useful:http://www.holoborodko.com/pavel/?page_id=12
ToastedSoul
+1  A: 

MPIR is a valid alternative. Basically, the GMP folk didn't want to support building on Windows at all. Brian Gladman, as you can see, supported GMP building on Windows for a while. However, eventually he and others forked GMP and created MPIR. That wasn't the sole reason but it was a large driving factor and one of the key development principles of MPIR is it must build on Windows (as well as Linux and Mac and...).

Ninefingers
+2  A: 

This question is old and already answered, but I have recently written an article that may be of use -- it shows how to install and use MPIR in Visual C++: http://www.exploringbinary.com/how-to-install-and-run-gmp-on-windows-using-mpir/ .

Rick Regan
+1, that's excellent. I'm actually an MPIR developer now, funnily enough, mind if I mail that out to the mailing list? Might be useful to link from mpir.org? If you want to do it, the list is on www.mpir.org.
Ninefingers
@Ninefingers Thanks. Go ahead, you can mail it out. (And yes, a link from mpir.org would be nice, but I don't control that :).)
Rick Regan