Reputation: 820
I am using Codelite 5.3 on Windows 7. I created a new workspace and added a new project in it. But when I try tobuild the project, Codelite is not compiling and ends with the Build Message:
C:\Windows\system32\cmd.exe;C:\GnuWin32\bin;C:\Program Files (x86)\CodeBlocks\MinGW\bin /c "mingw32-make.exe -j 4 -e -f Makefile"
Nothing else. When I run the project, empty Output window appears (which happens when the project isn't built properly, still the project is run).
What should I do to fix this?
When I tried adding C:\Program Files (x86)\CodeBlocks\MinGW\bin
in environmental variable Path
, and tried to Build, then the Build Output I got is:
Failed to start build process, command: C:\Windows\system32\cmd.exe;C:\GnuWin32\bin;C:\Program Files (x86)\CodeBlocks\MinGW\bin /c "mingw32-make.exe -j 4 -e -f Makefile", process terminated with exit code: 0C:\Windows\system32\cmd.exe;C:\GnuWin32\bin;C:\Program Files (x86)\CodeBlocks\MinGW\bin /c "mingw32-make.exe -j 4 -e -f Makefile"
Upvotes: 2
Views: 5867
Reputation: 61620
The build command:
C:\Windows\system32\cmd.exe;C:\GnuWin32\bin;C:\Program Files (x86)\CodeBlocks\MinGW\bin /c "mingw32-make.exe -j 4 -e -f Makefile"
is nonsense. It should be:
C:\Windows\system32\cmd.exe /c "mingw32-make.exe -j 4 -e -f Makefile"
where C:\Windows\system32\cmd.exe
is the system shell. But:
C:\Windows\system32\cmd.exe;C:\GnuWin32\bin;C:\Program Files (x86)\CodeBlocks\MinGW\bin
is not even the pathname of any executable file, or even a pathname. It appears to be
a PATH
-like value invalidly prefixed with the name of the shell.
CodeLite (quite properly) obtains the shell name C:\Windows\system32\cmd.exe
from the value of the system environment variable ComSpec
.
I believe the only way this in which this mess could have occurred is that the value of ComSpec
has been trashed on the system before CodeLite runs.
Navigate Control Panel -> System and Security -> System
-> Advanced system settings -> Environment Variables and inspect ComSpec
in the System variables. Also look for ComSpec
or COMSPEC
in the User variables in case a an overriding value has been set up there. If the value is not C:\Windows\system32\cmd.exe
then correct it.
Upvotes: 2