I've just installed CodeLite 7.0 Beta on a Windows 7 x64 machine and I attempted to create a simple test project using the project wizard. The main.cpp files successfully compiles to main.c.o but afterward, the link step fails with the following error:
Here is the output of building a project freshly created with the "Simple executable (g++)" wizard by using the build command you specified in a command line prompt:
C:\Users\pmjobin\Workspace\Test>C:\Windows\system32\cmd.exe /c "D:/MinGW/bin/mak
e.exe -j4 SHELL=cmd.exe -e -f Makefile"
"----------Building project:[ Test - Debug ]----------"
make.exe[1]: Entering directory 'C:/Users/pmjobin/Workspace/Test'
D:/MinGW/bin/g++.exe -c "C:/Users/pmjobin/Workspace/Test/main.cpp" -g -O0 -Wa
ll -o ./Debug/main.cpp.o -I. -I.
g++.exe: error: C:/Users/pmjobin/Workspace/Test/main.cpp -g: No such file or dir
ectory
g++.exe: fatal error: no input files
compilation terminated.
Test.mk:94: recipe for target 'Debug/main.cpp.o' failed
make.exe[1]: *** [Debug/main.cpp.o] Error 1
make.exe[1]: *** Waiting for unfinished jobs....
make.exe[1]: Leaving directory 'C:/Users/pmjobin/Workspace/Test'
Makefile:4: recipe for target 'All' failed
make.exe: *** [All] Error 2
I noticed that compiling the Test.cpp file manually by using the context menu in the workspace view works. If I attempt to launch the build command again from this point, here is what I get:
2 things that seems strange to me here:
- codelite is running 'make.exe' and not 'mingw32-make', is it a self installed MinGW?
- Even though that codelite passed 'SHELL=CMD.EXE' in the build line, your make still searches for /bin/sh - this again seems to me that you are using the wrong make tool
I use a self-installed MinGW indeed. The make.exe is simply an exact copy of the mingw32-make.exe I made to please some autoconf scripts that were looking for make. I deleted it and cleared CodeLite's config in my user profile and now, CodeLite uses mingw32-make as expected. As for sh.exe (bash) in my path, renaming it to sh.exe.bak seems to have corrected the issue as I can now build the project successfully. I do need sh.exe in my system path, however. Is there a way to circumvent this issue in CodeLite? I am asking because a previous version of CodeLite (5.3) used to work with this setup.
pmjobin wrote:As for sh.exe (bash) in my path, renaming it to sh.exe.bak seems to have corrected the issue as I can now build the project successfully. I do need sh.exe in my system path, however. Is there a way to circumvent this issue in CodeLite? I am asking because a previous version of CodeLite (5.3) used to work with this setup.
Your make should have honoured the SHELL=CMD.EXE that codelite passes, if it does not, then you should upgrade your make.exe or use the one that comes with codelite