I have the "...no newline..." error. What is this?

General discussion on mikroC.
Post Reply
Author
Message
pizon
mikroElektronika team
Posts: 823
Joined: 11 Oct 2004 08:53

I have the "...no newline..." error. What is this?

#1 Post by pizon » 28 Jul 2005 08:23

Q: (mikroC 2.1 and older) On compile, I keep getting the following error:

Code: Select all

End of input with no newline, skipped the line....
1 error in preprocessor.
What is wrong?

A: You need to add a newline (<Enter>) at the very end of your source file. ANSI C standard explicitly requires for all the source files to end with the newline character (ASCII 0x0A). Most (if not all) of the PC-targeted compilers add this character automatically each time you save the file. You can try this for yourself - open a project in Microsoft or Borland, then delete the last empty line(s) and save the file; the newline will appear again 'by itself' at the end of file. We will add this feature in the version(s) to follow, in the meantime you'll have to take care about this by yourself.

-

Post Reply

Return to “mikroC General”