CreateProcess: No such file or directory

Insomaniacal picture Insomaniacal · Oct 3, 2010 · Viewed 147.4k times · Source

I am getting this error whenever I try to run GCC outside of its installation directory (E:\MinGW\bin).

So, let's say I am in E:\code and have a file called one.c. Running: gcc one.c -o one.exe will give me this error:

gcc: CreateProcess: No such file or directory

The only workaround is to navigate to its installation directory, run gcc from there, and specify all the other paths. My environmental variable Path contains E:\MinGW\bin.

Any suggestions to fixing this problem? I am running Windows XP SP3.

Answer

Herberth Amaral picture Herberth Amaral · May 22, 2011

According to Code::Blocks wiki, you need to add C:\MinGW\libexec\gcc\mingw32\MinGW-Version to your PATH. There is no need to restart, but you need to open another terminal in order to get the newest PATH settings.

For MinGW-w64, that's <mingw install directory>\libexec\gcc\x86_64-w64-mingw32\4.7.0\