MinGW - libgmp-10.dll

Hi,

I tried to execute the following command line code

C:\Scripts>C:\MinGW\bin\g++ helloworld.cpp -o helloworld.exe

However, I got the following error message.

"The program can;t start because libgmp-10.dll is missing from your computer. Try reinstalling the program to fix this problem."

I did the following:
1) added C:\MinGW\bin\ to path
2) use full path on the command line code
3) restarted the computer
4) reinstall MinGW
5) checked and confirm that I have the file libgmp-10.dll in C:\MinGW\bin\

but none of these works!

I exhausted all the possible solutions but none of them work. Wonder if someone could help!

Thank you!

I would recommend compiling with TDM-GCC instead. http://tdm-gcc.tdragon.net/
You do not even need to restart your computer :) Just make sure that MinGW is removed from your path before installing TDM-GCC.

Alternatively, you could copy libgmp-10.dll and put it beside helloworld.exe
Last edited on
I copied and pasted the helloworld.cpp file into the same folder where g++.exe file is located and ran the following code on command prompt.

C:\MinGW\bin>C:\MinGW\bin\g++ helloworld.cpp -o helloworld.exe

It works this way, I was able to compile the helloworld.cpp file. Why is it so?
Because that is the same folder libgmp-10.dll is in. You can also copy that dll file and put it next to helloworld.exe.

Edit: I still recommend using TDM-GCC as I pointed out in my other post. TDM-GCC is based off of MinGW, but it uses sensible defaults that prevent needing to copy compiler related dll files.
Last edited on
Topic archived. No new replies allowed.