Quote:
|
Originally Posted by incognito_NICK
all of a sudden when i compile now i get this error:
C:mcc18hadc.h:160:Error: syntax error
witch goes to this line in the code:
-> union ADCResult
{
int lr; // 2 bytes as a long
char br[2]; // 2 bytes as 2 chars
};
what should be done to correct this error?
|
Which .c file is it compiling when you get this error?
I am guessing that it must be main.c, user_routines.c, or user_routines_fast.c. because:
- In adc.h, the line you indicated is the first line that is neither a comment line, a blank line nor a preprocessor directive.
- adc.h is #included first in only in ifi_aliases.h, which is in turn #included first in only these three .c files.
I predict that there is some unintelligible garbage somewhere before the #include "ifi_aliases.h" in whichever one of these files is producing the error message. I further predict that the garbage is right at the beginning of the file. (Probably the result of some unintended keystrokes made sometime when the file/project was first opened.)
Good luck!