libgmp-10.dll is missing

前端 未结 10 1226
甜味超标
甜味超标 2020-12-02 18:02

I recently installed MinGW on my 64-bit Windows 7 computer and when I attempt to compile the most basic of c++ programs, for example

#include         


        
10条回答
  •  北荒
    北荒 (楼主)
    2020-12-02 18:58

    Caution - removing stuff from your path can compromise your system!

    Interestingly, you not only need to add the MinGW bin to your Path, but also you need to make sure that certain things are not on your path*. In my case, I saved my entire path variable as a backup, deleted everything non-system from my path except for MinGW and CMake, leaving:

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

    You should use the appropriate elements from your system path.

    I first tried to do this with a batch job that launched CMake, but it seems that the CMake GUI was reaching back and grabbing the System 'Path' variable instead of the command prompt 'Path' variable, which I had printed and confirmed was as listed above before launching CMake.

    Incidentally, I backed up the entire Windows VM before starting!

    * For instance: various references, including known issues, mention sh.exe. I inherited this VM from my client and hacked it up further, so it's easier for me to use a clean path for my cross-compiling task and return afterward...

提交回复
热议问题