Street Smart
2009-09-26 09:03:17 UTC
The program is as follows:
#include
main()
{
printf("This is a C program\n");
}
I typed gcc -o newfilename sourcename.c
However. after that I got this:
sourcename.c:1:19: error: stdio.h: No such file or directory
sourcename.c: In function ‘main’:
sourcename.c:5: warning: incompatible implicit declaration of built-in function ‘printf’
and it wouldn't compile.
Why is it it stated there is no stdio.h file? Isn't this file a standard file in C? Why did it also state "incompatible implicit declaration of built-in function ‘printf’"? Isn't the command printf a standard command in C?
What went wrong with my program?
Thanks in advance. I am only a novice.