问题
I am trying to install gmp on windows. I have found the mingw way of compiling from sources on windows. But was unable to find binaries fro gmp 6.1.2 or visual studio project in order to compile from sources. So the question is: Where can I download the gmp 6.1.2 binaries or compile from sources using Visual Studio.
回答1:
Compiling GMP on Windows with VisualStudio might be tricky, however there are already some SO questions, that might help you (depending on your exact use-case):
- Building GMP library with Visual Studio?
- How to install MPFR and GMP for C++ on visual studio
- GMP on visual studio c++
Simple answer is, that there are no sources of GMP compilable directly using VisualStudio as GMP is developed with UNIX in mind.
Summary of your options:
- Use GMP version provided in your MinGW distribution
- Compile own GMP using MinGW/Cygwin
- Use MPIR fork of GMP compilable using VisualStudio
- Try to solve all the compilation problems yourself, some hints for older GMP versions are here:
- https://cs.nyu.edu/exact/core/gmp/
- http://www.blizzhackers.cc/viewtopic.php?t=393933
来源:https://stackoverflow.com/questions/47359417/how-to-compile-gmp-for-windows-using-visual-studio