且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

g ++:错误:CreateProcess没有这样的文件或目录

更新时间:2022-06-23 05:28:52

我遇到这个错误,我尝试重新安装MinGW,更改路径等

I had this error and I tried reinstalling MinGW, changing Path, etc

最后,从用户和系统的Environment变量中删除GCC_EXEC_PREFIX env变量使它工作!
这也是为什么CMake说C编译器识别未知的根本原因。
在我的例子中,我认为这是因为Qt自带了MinGW。这可能是你的原因(即,mingw已经存在于其他地方)

Finally, Removing the GCC_EXEC_PREFIX env variable made from the Environment variable for both User and System made it work! And this was also the root cause of the reason why CMake said C compiler identification is unknown. In my case I think it was because Qt ships with its own MinGW. That could be the reason for you too (ie, mingw already exists elsewhere)