I'm using Microchip's XC8 compiler. They want me to #include <xc.h>
instead of including a chip-specific header. However, when I add this code on the first line of my code, I'm getting the error:
Error [224] C:\...\main.c; 1.4 illegal "#" directive
When I place a line feed before the directive, I don't get the error. Why is this?
My full code:
#include <xc.h>
#pragma config OSC =INTIO67, WDT = OFF, LVP = OFF, PBADEN = OFF
void main() {
while (1);
}
With the line feed, the code looks just the same, but with a blank line on top.