3

This question is about how to install "mpfr" with visual studio 2010 in windows OS.

Though I have actually solved the mpfr installation problem by using a pre-compiled mpfr library (see the details here: install mpfr via precompiled mpfr library), I would still prefer to rebuild it myself since I am new and can learn more in C++ and Visual studio through such experience.

However, per the guidelines in Brian Gladman's GMP/MPIR/MPFR/MPC page and after downloading the mpfr.svn.build.vc10 and mpfr-3.0.0.build.vc10, I failed to rebuild them myself per the readme.txt inside.

Is there anyone who has successfully rebuilt them? I would need more detailed guidelines on this for newbies.

Thank you!

Community
  • 1
  • 1
LCFactorization
  • 1,652
  • 1
  • 25
  • 35
  • Please put a look at [my answer](https://stackoverflow.com/a/73852387/941531), just wrote it now, it describes in very details 3 ways of compiling GMP and MPIR under Windows VisualStudio. – Arty Sep 26 '22 at 09:56

1 Answers1

3

I've built MPIR, MPFR, and MPC with Visual Studio as part of gmpy ( https://code.google.com/p/gmpy/ ). A full snapshot of my directory structure, with all the source files, is available as https://gmpy.googlecode.com/files/full-src-mpir-mpfr-mpc-gmpy2-2.0.2.zip

Look for a file called windows_build.txt; it contains my notes for building a new release of gmpy2. It may not answer all your questions but it will give you a known working environment to start from.

casevh
  • 11,093
  • 1
  • 24
  • 35
  • hi @casevh, Thank you very much! All work perfectly!! How do you know such detailed settings? PS: how can I determine the versions of different libraries (mpir, mpfr, mpc ?)? Is it possible to get the most recent versions of these libraries converted? – LCFactorization Nov 06 '13 at 07:08
  • 2
    I'm currently using MPIR 2.6.0 with one patch, MPFR 3.1.2, and MPC 1.0.1. I try to keep current with the most recent released versions. – casevh Nov 06 '13 at 14:29
  • thank you @casevh for your efforts! Many people may benefit from your work. – LCFactorization Nov 06 '13 at 23:29
  • hi @casevh, I tested the version numbers by the code from this link http://svn.haiku-os.org/oldhaiku/buildtools/trunk/gcc/mpc/tests/tget_version.c and found the version information as follows:GMP 5.0.2(the most recent is v5.1.3),MPFR v3.1.1 ( the latest v3.1.2), both MPIRv2.60 and MPC v1.01 are the most recent. :) – LCFactorization Nov 08 '13 at 13:59
  • 1
    @LCFactorization, the GMP version number refers to the version used to update the MPIR fork. I was confused about the MPFR version. I think the new version can be copied over the old version. – casevh Nov 08 '13 at 14:12
  • @casevh are you still active here? The link is not working anymore. – KKZiomek Sep 09 '17 at 14:22
  • @KKZiomek I am still around. I am working on an updated build with the latest versions of mpir, mpfr, and mpc. I'll add another comment when it is complete and available. – casevh Sep 11 '17 at 06:00