I am trying to compile a C code and it won't work. Here is the code i type #include <stdio.h> main() { printf("Hi\n"); return 0; } I save it as Hi.c and go to the Bash prompt and type gcc Hi.c and i get a message that says hi.c :: 7:2 no new line command found. I have tryed again and again and it won't work please help me. I have inquared with the the man pages and info page and there is no info that helps me.
If you mean warning: no newline at end of file then it is just that, a warning, telling you that each .c/.h file is supposed to end by a newline. Unless you used -Werror, GCC compiled the file, but you should nevertheless fix it by adding a newline to the end (e.g. echo >> Hi.c would do).