Thread: Error compiling C program with GCC in Cygwin
i have basic c program:
when run gcc c compiler in cygwin, following output:code:/*h2e2.c: first handwritten program*/ #include <stdio.h> main() { printf ("it's fun write own program in c.\n"); return 0; }
i don't know means. help? (i know there newline @ end of printf statement, need 1 somewhere else?)code:eric@gross-pc ~ $ gcc -o h2e2.exe h2e2.c h3e2.c:8:2: warning: no newline @ end of file
thanks!
ugh... first, let's write in modern standard c.
now onto gcc. notice isn't error, warning. executable surely created , should work... "no newline" thing means file should end blank line... don't remember reason, sure it's legacy thing of none importance.code:/*h2e2.c: first handwritten program*/ #include <stdio.h> int main(void) /* not "main()"!!!*/ { printf ("it's fun write own program in c.\n"); return 0; }
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk Error compiling C program with GCC in Cygwin
Ubuntu
Comments
Post a Comment