I can see no reason behind that, but i cannot reproduce that error either. Can you post a project that shows that strange behaving? To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
It should not lead to an error, but you did something you strictly should avoid: You defined (allocate space) a variable in a .h-file.
Usually you only declare (announce that a declaration will follow) a variable here which forbids an initialization at this point.
Best practice: in .h file
extern uint8 My_FoundObserver; // Declaration, no memory is allocated here
and in your .c file
uint8 My_FoundObserver = FALSE; // Definition
Same applies to your counter variable
And something I use for my boolean constants:
#define FALSE 0 // This conforms with C-language if, while etc
#define TRUE !FALSE // Tribute to Mr. Boole
Thanks Bob for your valiable advice :-)
You are always welcome!
I think thats correct. If you include that header file from multiple C files, you get really multiple definitions for the same variable. And then the linker complains about it, because it cannot tell which one to use.