Never declare variables in header files (.h), otherwise, everytime you include that header file you'll be ordering the compiler to declare the variable all over again. That's why you see those "multiply defined" errors.
In the header file use:
Code:
extern char myvariable;
Then really declare the variable as a global only in one of your .c files.
There is an alternative way to declare variables in a header file that involves a conditional compile:
Code:
#ifdef DECLARE_MY_VARIABLES
char myvariable;
#else
extern char myvariable;
#endif
And in one (and only one) .c file
Code:
#define DECLARE_MY_VARIABLES
#include that_header_file.h
#undef DECLARE_MY_VARIABLES