MinGW的sh.exe不能在你的路径
目前试图建立我的C开发环境与MinGW的窗口,它看起来像CMake的是给我下面的错误:MinGW的sh.exe不能在你的路径
sh.exe was found in your PATH, here:
C:/Program Files/Git/user/bin/sh.exe
For MinGW make to work correctly sh.exe must NOT be in your path.
Run cmake from a shill that does not have sh.exe in your PATH.
If you want to use a UNIX shell, then use MSYS Makefiles
被抛出内部的错误CLion IDE。我不确定是否需要更改CLion内部的设置或内容。我看过我的Windows路径,但没有看到对sh.exe的任何引用。
我的路径如下:
C:\Program Files (x86)\Razer Chroma SDK\bin;C:\Program Files\Razer Chroma SDK\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Nodist\bin;C:\Users\wesle\AppData\Local\Microsoft\WindowsApps;
检查你真的不打开一个Windows命令行,然后键入where sh.exe
在你PATH
sh.exe
。如果你的路径中有这个文件,那么该命令将返回它的路径(然后你应该从你的PATH
中删除它),否则如果窗口返回它没有找到,请尝试清理文件夹CMakeFiles
和文件名CMakeCache.txt
在你的项目中的某个地方夹。
这很有用,ty。 – Haboryme
对我来说,传递给cmake的这个简单的参数已经工作-DCMAKE_SH="CMAKE_SH-NOTFOUND"
。
@Septimus请将此标记为答案 –
检查路径中的“C:/ Program Files/Git/user/bin”。你的GIT与其壳一起安装。 –
然后从你的'PATH'中移除它? –
正如我已经看过我的'PATH',我没有看到/ Git /或sh.exe的任何引用 – Septimus