C HelloWorld build fails
Posted: Fri Jan 06, 2012 2:20 pm
I am using CodeLite 3.5.5377 on Windows 7. I have successfully compiled and run a HelloWorld C++ Console Application. I am now trying to do a C HelloWorld console application. I made a workspace LearningC, and a new project HelloWorld. For the project I selected "Console" and "Simple executable (gcc)". After a trivial modification to the main.cpp that it creates, I tried to build and was unsuccessful. There is a "warning" about not finding stdio.h. I don't recall having to tell a compiler about headers in the standard C library before. It also says that the build had 0 errors and 1 warnings. However, in the Debug directory, there is no executable file. This is the build output:
_________________________________________________________________________________________________
----------Build Started--------
C:\Windows\system32\cmd.exe /c ""mingw32-make.exe" -j 2 -f "LearningC_wsp.mk""
----------Building project:[ HelloWorld - Debug ]----------
mingw32-make.exe[1]: Entering directory `c:/Home/CodeLite/LearningC/HelloWorld'
c:/Home/CodeLite/LearningC/HelloWorld/main.c:1: warning: No include path in which to find stdio.h
gcc: unrecognized option `-MP'
gcc: unrecognized option `-MT./Debug/main.o'
gcc: unrecognized option `-MF./Debug/main.o.d'
main.o: c:/Home/CodeLite/LearningC/HelloWorld/main.c
gcc -c "c:/Home/CodeLite/LearningC/HelloWorld/main.c" -g -O0 -Wall -o ./Debug/main.o -I. -I.
c:/Home/CodeLite/LearningC/HelloWorld/main.c:1: stdio.h: No such file or directory
mingw32-make.exe[1]: *** [Debug/main.o] Error 1
mingw32-make.exe[1]: Leaving directory `c:/Home/CodeLite/LearningC/HelloWorld'
mingw32-make.exe: *** [All] Error 2
----------Build Ended----------
_________________________________________________________________________________________________
----------Build Started--------
C:\Windows\system32\cmd.exe /c ""mingw32-make.exe" -j 2 -f "LearningC_wsp.mk""
----------Building project:[ HelloWorld - Debug ]----------
mingw32-make.exe[1]: Entering directory `c:/Home/CodeLite/LearningC/HelloWorld'
c:/Home/CodeLite/LearningC/HelloWorld/main.c:1: warning: No include path in which to find stdio.h
gcc: unrecognized option `-MP'
gcc: unrecognized option `-MT./Debug/main.o'
gcc: unrecognized option `-MF./Debug/main.o.d'
main.o: c:/Home/CodeLite/LearningC/HelloWorld/main.c
gcc -c "c:/Home/CodeLite/LearningC/HelloWorld/main.c" -g -O0 -Wall -o ./Debug/main.o -I. -I.
c:/Home/CodeLite/LearningC/HelloWorld/main.c:1: stdio.h: No such file or directory
mingw32-make.exe[1]: *** [Debug/main.o] Error 1
mingw32-make.exe[1]: Leaving directory `c:/Home/CodeLite/LearningC/HelloWorld'
mingw32-make.exe: *** [All] Error 2
----------Build Ended----------