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.
Asked
Active
Viewed 6,681 times
4
-
Where to download gmp binaries for windows or compile them from sources using Visual Studio? – user2420079 Nov 17 '17 at 21:19
-
I am looking for gmp libs or looking of a compilation way. Not sure if this is off-topic. – user2420079 Nov 17 '17 at 21:22
-
This is off topic. Part asking for tutorial and part asking for library. Not sure how to salvage this question. Do you have the mingw code? If so have you tried to make a visual studio project around it? – user4581301 Nov 17 '17 at 22:02
-
I want to get the libs. I am trying to get this by googling for libs or compiling. The visual studio project creation is something I am working on now. Not sure why it is offtopic... – user2420079 Nov 17 '17 at 22:05
-
[You are running up against Rule 4](https://stackoverflow.com/help/on-topic), which you will find is markedly different from Rule 34. I have't lodged any down or close votes because I'm kinda hoping you do get an answer for this. I might need it one day soon. – user4581301 Nov 17 '17 at 22:10
-
If you install mingw, most likely it will come with a package manager and some version of GMP. – Marc Glisse Nov 17 '17 at 22:17
-
OK. Thank you. I just would like to create VS project. And thinking how to deal with gmp. – user2420079 Nov 17 '17 at 22:19
-
GMP is available already prebuilt on MinGW. Also [available here](https://www.rpmfind.net/linux/rpm2html/search.php?query=mingw32(libgmpxx-4.dll)). – Hans Passant Nov 17 '17 at 23:56
1 Answers
2
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:
pe3k
- 801
- 5
- 15