Libgmp-10.dll is missing

I recently installed MinGW on my 64-bit computer running Windows 7, and when I try to compile the simplest of C ++ programs, for example

#include<iostream> using namespace std; int main() { cout << "Hello World" << endl; return 0; } 

I get the error message "The program cannot start because libgmp-10.dll is missing from your computer."

+53
c ++ windows windows-7 mingw
Aug 05 2018-11-11T00:
source share
9 answers

Have you tried adding C:\MinGW\bin as the Path system variable (not PATH ) in Settings->System Properties->Environment Variables ?

I saw this solution on this page: Missing libgmp-10.dll

+79
Aug 05 2018-11-11T00:
source share

Go to the mingw download page and browse the following directories:

MinGW / Base / gmp / gmp-5.0.1-1

You are currently receiving the following link:
http://sourceforge.net/projects/mingw/files/MinGW/Base/gmp/gmp-5.0.1-1/libgmp-5.0.1-1-mingw32-dll-10.tar.lzma/download
and it contains the necessary file.

I know that there are automatic methods for installing mingw gcc, but when using a single mingw package, gmp is one of the required downloads.

+8
Oct 05
source share

added

c: / MinGW / bin for PATH

and restarted CMake-gui

worked for me

+4
May 20 '13 at 12:36
source share

I came across this question when I started creating CodeBlocks and then clicked on my project. After the project notes appeared and I clicked OK, an error appeared:

"System error: the program does not start because libgmp-10.dll is missing on your computer. Please reinstall the application to fix this problem."

I click OK several times, and then I was able to perform normal compilation, link, etc., but this error occurred every time I ran C :: B and went to the project. Then I noticed that the LLVM Clang compiler was my default compiler in the compiler settings, although GCC was installed as the compiler specific to the project I was working on.

The solution was to install the compiler in the compiler settings in GCC (mingw), and also set it as the default compiler. After that, this system error stopped appearing every time I started the project.

The reason I posted this answer is because it answers the OP question, and other people with the same question may have a similar reason for this annoyance, and my personal experience with this question may be useful for these people .

+3
Aug 16 '14 at 13:40
source share

If you did not find this file in your installation directory, then went to the site [Click here ] to download the file, and then extract it to the .enjoy installation directory :-)

+2
Oct 05
source share

Caution - Removing materials from your path may compromise your system!

Interestingly, you need to not only add the MinGW bit to your path, but you also need to make sure that some things are not in your path *. In my case, I saved the entire path variable as a backup, removing all non-system ones from my path except MinGW and CMake, leaving:

 C:\MinGW\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files (x86)\CMake\bin 

You must use the appropriate elements in your system path.

At first I tried to do this with a batch job that launched CMake, but it looks like the CMake GUI was returning and grabbing the System Path variable instead of the "Path" command line, which I typed and confirmed as above before running CMake.

By the way, I made a backup of the entire Windows virtual machine before starting!

* For example: various links, including known problems , specify sh.exe. I inherited this virtual machine from my client and hacked it further, so it’s easier for me to use the clean path for my cross-compilation task and come back after that ...

+1
Apr 12 '16 at 16:58
source share

In the newly installed MinGW using the installer mingw-get-setup.exe v0.6.2beta-20131004-1. Although I selected the gcc package during the installation, the installer did not include the “mingw32-gmp” package, which includes libgmp-10.dll. I had to restart the installer, select the "Reinstall" option and manually select the "mingw32-gmp dev" package.

0
Apr 6 '18 at 13:59
source share

If you do not have permission to change the global path, you can also change the active directory of your cmd shell.

How to do it (in cmd shell):

 C:\> cd C:\MINGW\bin C:\MINGW\bin> gpp.exe C:\Users\James\Desktop\Program.cpp 

How it doesn’t work:

 C:\>C:\MINGW\bin\gpp.exe C:\Users\James\Desktop\Program.cpp 

Note: you must change "C: \ Users \ James \ Desktop \ Programm.cpp" wherever your program lies

How it works: windows look for necessary DLLs in one directory, and if it cannot find it there, it will look in PATH variables (therefore it will look for system32 by default) if you add the missing DLLs to the directory from which you start it windows look and use them (even before it looks in PATH).

-one
Jun 26 '17 at 9:16 on
source share

A very simple fix for this problem with the absence of the / s driver file is to select and copy all the dll files from C: \ MinGW \ Bin and paste them into your C: \ MyPrograms or otherwise, if your folder is for the created C ++ files (.cpp) is located.

-one
Jul 02 '17 at 16:11
source share