g ++:错误:CreateProcess没有这样的文件或目录
我收到以下错误:
g++: error: CreateProcess no such file or directory
。我已经安装了MinGw 7.2版本在Windows机器上的工作,但不会发生问题,但是在我的家庭计算机上安装Windows SP3后,我得到这个错误,我只是不能想出来,因为我已经设置所有的环境变量正确。我甚至尝试设置路径 C:\MinGw\libexec\gcc\i686-mingw32\4.6.1
其中cc1plus.exe和cc1.exe是如果我在命令行输入:
whenever I try to compile a program. I have installed the MinGw 7.2 version at work on a windows machine and the problem does not occur, however after installing Windows SP3 on my home computer I get this error and I just can't figure it out since I have set all the environment variables properly. I even tried setting the path to C:\MinGw\libexec\gcc\i686-mingw32\4.6.1
where cc1plus.exe and cc1.exe are located but still no luck.If i type this at the command line:
_assoc .cpp = cpls
_assoc .cpp=cpls
_ftype cpls = g ++%1%*
_ftype cpls=g++ "%1" %*
_program.cpp
_program.cpp
它似乎编译,因为我得到C ++ 11关键字的编译时错误,没有-std = c ++ 0x开关不能识别。有什么建议么?提前感谢。
it seemse to compile since I get compile time errors for the C++11 keywords which aren't recognized without the -std=c++0x switch. Any suggestions? Thanks in advance.
我遇到这个错误,我尝试重新安装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)