What are the command line ways of pointing gcc to the helper executables so that you don't get the error
gcc: error: CreateProcess: No such file or directory
The error is mentioned here
http://wiki.codeblocks.org/index.php?title=Installing_MinGW_with_VistaAnd it shows a GUI way around it. To enable Ming's gcc to find its helper executables.
But what are the command line ways around it?
What is codeblocks doing in the background with the command line Ming gcc to make it work?
I have found it works with PATH=. or PATH=
e.g.
C:\MinGW\bin>set path=
C:\MinGW\bin>gcc file6.c
C:\MinGW\bin>
Whereas it fails doing this
C:\MinGW\bin>set path=c:\Perl64\site\bin
C:\MinGW\bin>gcc a.c
gcc: error: CreateProcess: No such file or directory
C:\MinGW\bin>
Though this works
C:\MinGW\bin>set path=c:\Perl64\site\bin
C:\MinGW\bin>.\gcc a.c
C:\MinGW\bin>
In both cases it is running C:\MinGW\bin\gcc.exe
So it seems that whether you do .\gcc or gcc dictates whether after gcc is run, where it looks for helper files. With the .\ windows find and executes the gcc in the current directory, but then gcc just looks in or within the current directory. Without the .\ windows finds and executes the gcc in the current directory, but then gcc looks in the path.
(And it's not like in bash/bourne where if the current directory is not in the path then it won't look in the current directory. It is running the gcc in the current directory)
This works
C:\MinGW\bin>set path=.;c:\Perl64\site\bin
(i.e. adding the current directory to the path)
And this works
C:\MinGW\bin>set path=c:\MinGW\bin.;c:\Perl64\site\bin
(i.e. adding the current directory to the path)
i.e. with those two paths, gcc and .\gcc work
What is it that codeblocks does at the command line, as set in the GUI, to get Ming gcc to work?
(I've added code tags to make formatting clearer, as suggested by BlueHazzard)