Author Topic: Weird "CreateProcess: No such file or directory" error  (Read 53356 times)

Offline PooyaM

  • Single posting newcomer
  • *
  • Posts: 6
Weird "CreateProcess: No such file or directory" error
« on: June 29, 2013, 09:23:35 pm »
I installed C::B version 12.11 with the minGW from the site
Created a new console project
C language
debug+release
compiled the "main.c".
Expected to see the "Hello World!" but I got this error which is on my nerves about 6 hours!

-------------- Clean: Debug in Euler (compiler: GNU GCC Compiler)---------------

Cleaned "Euler - Debug"

-------------- Build: Debug in Euler (compiler: GNU GCC Compiler)---------------

mingw32-gcc.exe -Wall  -g     -c "C:\...\Project Files\Codes\Euler\main.c" -o obj\Debug\main.o
mingw32-gcc.exe: error: CreateProcess: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings (0 minutes, 0 seconds)

Where is the problem?
 :'( :'( :'(
==>>SOLUTION:<<==
In my case, the problem resulted from a program called EGCS (Experimental/Enhanced GNU Compiler System).
I installed it as a prerequisite for PSCAD(Power Systems CAD) along with a FORTRAN Compiler.
Just remove it, and you'll be fine
(Sadly, I deleted the entire PATH environmental variable due to a mistake. So what?...I ended up installing a new Win7 but after uninstalling my Ubuntu which again due to the Boot difficulties _which resulted from uninstalling GRUB_, I again ended up messing around with fixmbr and fixboot fellas(But I've lost my Laptop DVD!)...In summary, The EGCS laughed at me for a 1/2-MONTH...)
« Last Edit: July 15, 2013, 11:32:33 am by PooyaM »

ToApolytoXaos

  • Guest
Re: Weird "CreateProcess: No such file or directory" error
« Reply #1 on: June 29, 2013, 09:53:45 pm »
Avoid creating projects inside Program Files for many reasons. Move it to C:\ and try again. If it fails, try to reinstall your C::B and recompile your project again.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Weird "CreateProcess: No such file or directory" error
« Reply #2 on: June 29, 2013, 10:26:15 pm »
PooyaM: You forgot to tell what compiler are you using and what OS.

ToApolytoXaos: I don't think he is using C:\program files :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Weird "CreateProcess: No such file or directory" error
« Reply #3 on: June 29, 2013, 11:12:11 pm »
Apart from the known issue (which is not related to Code::Blocks but to MinGW) with pathnames that contain spaces such as "Program Files", there is another issue with program prefixes and suffixes, in this case, the "mingw32" bit.

Be sure that there exists a program gcc.exe in addition to mingw32-gcc.exe (and one non-prefixed version of every single compiler executable). If it does not, make a copy. Do note that neither symbolic links nor junctions seem to work. Junctions should actually work without the program knowing, but they don't do for me, neither under Windows XP, nor Windows 7, nor Windows 8.

This is even worse with TDragon's otherwise excellent GCC distribution. This one also uses suffixes in addition to prefixes (for example -DW2) which will cause tools like windres to fail with the exact same error that you see -- and no obvious explanation for why they fail, if you don't already know the reason.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

ToApolytoXaos

  • Guest
Re: Weird "CreateProcess: No such file or directory" error
« Reply #4 on: June 30, 2013, 12:17:17 pm »
PooyaM: You forgot to tell what compiler are you using and what OS.

ToApolytoXaos: I don't think he is using C:\program files :)

Quote
-------------- Build: Debug in Euler (compiler: GNU GCC Compiler)---------------

mingw32-gcc.exe -Wall  -g     -c "C:\...\Project Files\Codes\Euler\main.c" -o obj\Debug\main.o
mingw32-gcc.exe: error: CreateProcess: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings (0 minutes, 0 seconds)

and the above is considered what? we do know that certain windows XP cause the same issue like Windows Vista / Windows 7 with permissions. it could be something like this, i might be wrong; but, as a newbie myself i have fell into the same trap and had to deal with it for a couple of hours until i figure it out.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Weird "CreateProcess: No such file or directory" error
« Reply #5 on: June 30, 2013, 12:35:19 pm »
ToApolytoXaos: A path inside "c:\Documents and settings\blabla" or the modern "c:\user\blabla"
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

ToApolytoXaos

  • Guest
Re: Weird "CreateProcess: No such file or directory" error
« Reply #6 on: June 30, 2013, 12:42:26 pm »
@oBFusCATed: It seems you are not paying attention of what i'm saying. I have mentioned permissions apart from spaces within path (actually, i did not mention anything about spaces). Indeed it's a common issue, at least on Windows 7; it has though happened to me once with Windows XP, but i'm afraid I don't remember what exactly I did and caused such issue. Anyway, let's hope this guy solves his problems.
« Last Edit: June 30, 2013, 12:58:22 pm by ToApolytoXaos »

Offline PooyaM

  • Single posting newcomer
  • *
  • Posts: 6
Re: Weird "CreateProcess: No such file or directory" error
« Reply #7 on: June 30, 2013, 01:18:00 pm »
I use Windows 7/64bit.
Actually, I've used C::B vesion 10 since 2 days ago. I compiled and successfully runned about 20 codes in C in the past(even with a use of GMP library). When I got some strange error, I removed the previous file and added the new file to the project(I think the error was a result of using two "main()"s)
But yesterday, this STRANGE error popped up. I uninstalled C::B 10 and downloaded and installed the 12.11 version with minGW(32bit if matters). The error still existed...
Note:After installing the 12.11 version, A window popped up asking about my default compiler and it marked some other compilers(like Visual C++ and FORTRAN) with the color red(And I have MS Visual studio 2008 installed if it matters). What is this red mark story?  ???

Avoid creating projects inside Program Files for many reasons. Move it to C:\ and try again. If it fails, try to reinstall your C::B and
...
Moved to C:/ ... Error still exists:

-------------- Build: Debug in C (compiler: GNU GCC Compiler)---------------

mingw32-gcc.exe -Wall  -g     -c C:\CodesindriveC\C\main.c -o obj\Debug\main.o
mingw32-gcc.exe: error: CreateProcess: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings (0 minutes, 0 seconds)
 
Apart from the known issue (which is not related to Code::Blocks but to MinGW) with pathnames that contain spaces such as "Program Files",
...
Both gcc.exe and mingw32-gcc.exe and couples like gcc-ar.exe and ar.exe exist in MinGW folder in CodeBlocks directory
« Last Edit: June 30, 2013, 01:25:19 pm by PooyaM »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Weird "CreateProcess: No such file or directory" error
« Reply #8 on: June 30, 2013, 01:33:54 pm »
If you have ruled out all the "well-known" issues, you can use ProcessMonitor to see what is actually going wrong.

In addition to "no such file", this will also tell you exactly what file (and path) it was looking for. That may help narrow down the problem.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline PooyaM

  • Single posting newcomer
  • *
  • Posts: 6
Re: Weird "CreateProcess: No such file or directory" error
« Reply #9 on: June 30, 2013, 01:46:20 pm »
If you have ruled out all the "well-known" issues, you can use ProcessMonitor to see what is actually going wrong.

In addition to "no such file", this will also tell you exactly what file (and path) it was looking for. That may help narrow down the problem.
How can I use this program?
When I compile, Process Monitor won't update

Offline PooyaM

  • Single posting newcomer
  • *
  • Posts: 6
Re: Weird "CreateProcess: No such file or directory" error
« Reply #10 on: June 30, 2013, 02:14:31 pm »
I got something.
When I make a new file(test.c) and check both debug and release, There is not any obj\Debug\test.o file in the directory.Why ?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Weird "CreateProcess: No such file or directory" error
« Reply #11 on: June 30, 2013, 04:27:23 pm »
You have to build the target after you've added the file. Have you?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline PooyaM

  • Single posting newcomer
  • *
  • Posts: 6
Re: Weird "CreateProcess: No such file or directory" error
« Reply #12 on: June 30, 2013, 05:02:10 pm »
You have to build the target after you've added the file. Have you?
"Adding build target" is not a usual routine, is it?
Even when I follow http://wiki.codeblocks.org/index.php?title=Creating_a_new_project,(C++) it won't compile it

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Weird "CreateProcess: No such file or directory" error
« Reply #13 on: July 01, 2013, 12:07:04 am »
http://forums.codeblocks.org/index.php/topic,17030.0.html


"Adding build target" is not a usual routine, is it?

what do you mean with Adding abuild target?
You create a Project and add the files to it and, if you want, you can create build targets, for different tasks or build options (like release and debug)...

99% of this "CreateProcess: No such file or directory" are MinGW related. Try to uninstall it, and reinstall it... !!! MinGW and not CodeBlocks !!!!
Have you installed an second compiler like devc++? If yes remove it's path from the PATH environment.

greetings

Offline PooyaM

  • Single posting newcomer
  • *
  • Posts: 6
Re: Weird "CreateProcess: No such file or directory" error
« Reply #14 on: July 13, 2013, 10:24:17 pm »
http://forums.codeblocks.org/index.php/topic,17030.0.html


"Adding build target" is not a usual routine, is it?

99% of this "CreateProcess: No such file or directory" are MinGW related. Try to uninstall it, and reinstall it... !!! MinGW and not CodeBlocks !!!!
Have you installed an second compiler like devc++? If yes remove it's path from the PATH environment.

Worked!
Thanks for the link.I'll update my post