Multiple Precision for Visual Studio 2010

1k Views Asked by At

Can anyone suggest a multiple precision library that comes with pre-built windows binaries. I need to use it use with an existing Visual Studio 2010 project (or where I can get pre-built binaries for win7 64bit for GMP).

I have tried and failed to compile GMP and MPIR and other projects none of them work with various frustrating and ambiguous errors. Unfortunately time pressures are getting to me and what I need to implement is simple if I can get the library built/downloaded.

I need floating point support so a bigint library is not enough.

Thanks,

2

There are 2 best solutions below

1
On

http://www.cs.nyu.edu/exact/core/gmp/ has the following package with dlls:

dynamic GMP library and header file for Visual C++: gmp-dynamic-vc-4.1.2.zip

They also have the source project files if you want to try recompiling with a different version at some point.

0
On

Your best bet is MPIR. I've built MPIR and MPFR using VS 2010 so it is possible. My Windows system is down at the moment but here are some notes I made.

  1. Download MPIR, unpack, and rename directory to just be "mpir" - remove any version numbers.

  2. Find and follow the readme file that documents installing VSYASM.

  3. Run "mpir_config.py" with Python 3.x to create the project files.

  4. Change the number of parallel builds to 1.

  5. Select a particular target (say "lib_mpir_k8") and it should build.

MPIR also includes a couple of batch files so you can do a command line build using configure.bat and make.bat. I find it is easier than the GUI builds.

IIRC, to build MPFR, I had to modify some of the Include directories but my notes are a little too cryptic.

The MPIR mailing list is quite helpful, too.