My very basic knowledge of C and compilation process has gone rusty lately. I was trying to figure out answer to the following question but I could not con
You have two .c files. They get compiled separately. Each one includes your header file. Once. Each one gets a definition. They conflict at link time.
The conventional solution is:
#ifdef DEFINE_SOMETHING int something = 0; #endif
Then you #define DEFINE_SOMETHING in only one .c file.