Does anyone have a working GMP + MINGW installation?
Asked Answered
L

3

6

I've spent days and days trying to install GMP library on my MINGW windows installation. I completed the installation process of both dozens of times, followed any single guide on the internet but I couldn't manage to get things working. So, I'm here desperate to ask someone to help me brute-force this problem: does anyone have a WORKING mingw (32 bit) installation with GMP succesfully built and working on it? Could someone zip it and send it to me somehow? Like uploading it on mediafire/megaupload and sharing the link? I know this is not very elegant, but I'm really desperate. I'd just need a working installation of GMP on MINGW, possibly compiling c++ sources so that I can use directly operator overloading, but C version would be ok as well.

Please someone help, I can't complete my work just because of this bloody library

Thank you again

Matteo

Laski answered 30/8, 2011 at 22:59 Comment(3)
I feel your pain. My biggest beef with C++ is how hard it is to share libraries. Unfortunately, this type of question doesn't really belong on stack overflow.Kinesthesia
All right.. Do you have experience with mingw? I posted another question here: #7251570 Maybe you can help?Laski
When linking libraries with MinGW outside of the MSys shell, you're going to have to specify your paths like this: c:/path/to/lib. Looks weird, but that might fix your problem.Susian
M
8

To install GMP on mingw32 (with mingw reinstallation for updating, because mingw-get can't update):

Delete (move to another dir; archive or do other backup) your mingw32 installation.

Reinstall mingw32 from site (it will be newer).

Do a commands from msys:

 mingw-get install mingw32-gmp 
 mingw-get install mingw32-gmp-dev

Enjoy.

PS: if it doesn't works; do

 mingw-get install mingw32-gmp-dev 
 mingw-get install mingw32-libgmp

Find the downloaded files with *.lzma extension (they will be both in mingw subdirs and in Temporary Internet Files of IE browser)

Unpack them manually to main mingw dir.

Medicament answered 31/8, 2011 at 22:49 Comment(0)
C
0

The C++ wrapper works perfectly here. I have the following files, I believe I downloaded them from the MinGW site, but I am not completely sure:

gmp-5.0.1-1-mingw32-dev.tar
libgmp-5.0.1-1-mingw32-dll-10.tar
libgmpxx-5.0.1-1-mingw32-dll-4.tar

You need to copy the headers, libraries and dlls to their respective directories, and add the -lgmp -lgmpxx parameters to the compiler.

Calix answered 1/9, 2011 at 1:32 Comment(0)
I
0

Does anyone have a working GMP + MINGW installation? [...] Could someone zip it and send it to me somehow?

Just came across this question, and even though it dates back to 9 years ago, the following links might help.

Some weeks ago I built GMP for mingw32 so I can use it on my Win2000 laptop.

The archives are named gmp_2020-*_mingw32*.zip.

https://sourceforge.net/projects/mobilechessboar/files/avr-gcc%20snapshots%20%28Win32%29/

Just unzip and move to a location at your preference. It's cross-compiled on x86_64 which is the way I compile software for my old laptop.

Apart from GMP, the zip also contains MPFR, MPC, GSL and GMP-ECM.

I had some trouble with undefined references to print functions due to ms / mingw clash resp. ambiguity. The recent build tries to use the C99 compliant (mingw) versions. In case you encounter similar problems, or in case you prefer the ms versions, the following hack might help you:

https://mcmap.net/q/1775728/-undefined-reference-to-__ms_vsnprintf-39-when-linking-glfw-statically

As GMP-ECM always enables SSE2 no matter for which host it is configured, there is a nosse2 build to please old[tm] hardware.

Indomitability answered 8/5, 2020 at 19:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.