it is getting realy frustrating to do 30% code and 70% dealing with strange errors and problems.
i am trying to make a VERY simple variable in a .h file.
i have many other variable in diffrent .h files, all of them are working but in this special .h file i am getting this error when ever i am trying to add a new variable or function definition, this is inspite that it already contains one function definition that IS working.
not only that, when i try to add the variable to a diffrent .h file it sometimes compile and shows the results as expected but with diffrent times it suddenly decides he can't find the variable that only a minute ago he found with no problems.
this is the .h file:
#define inp(port) (port) #define outp(val, port) (port) = (val) #define inb(port) (port) #define outb(port, val) (port) = (val) #define sbi(port, bit) (port) |= (1 << (bit)) #define cbi(port, bit) (port) &= ~(1 << (bit)) extern u16 SavedValue; // error extern u08 USARTcount; // error void Setup(void);
for both lines i am getting:
expected '=', ',', ';', 'asm' or '__attribute__' before 'the variable'
Thanks and Regards, Ran.