g++: error: CreateProcess no such file or directory

12,838

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

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)

Share:
12,838
Marius Pirvu
Author by

Marius Pirvu

Programming hobbyist and cinema projectionist.

Updated on June 04, 2022

Comments

  • Marius Pirvu
    Marius Pirvu almost 2 years

    I get the following error:

    g++: error: CreateProcess no such file or directory
    

    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

    _ftype cpls=g++ "%1" %*

    _program.cpp

    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.