Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CreateProcess: No such file or directory

Tags:

c

gcc

mingw

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.

like image 689
Insomaniacal Avatar asked Oct 03 '10 02:10

Insomaniacal


People also ask

How do I set GCC path in Windows 7?

In case you need a system/user-wide PATH change, go to Control Panel->System->Advanced->Environment variables, and add or modify PATH there. done that.


1 Answers

I had a similar problem, caused by not installing the C++ compiler. In my case I was compiling .cpp files for a Python extension, but the compiler is first invoked as c:\mingw\bin\gcc.exe.

Internally, gcc.exe would notice it was asked to compile a .cpp file. It would try to call g++.exe and fail with the same error message:

gcc.exe: CreateProcess: no such file or directory

like image 55
Luis Bruno Avatar answered Nov 03 '22 01:11

Luis Bruno