You can only define a variable once, that allcoates space in memory where the value will be stored. you can then declare the variable in each file (or better yet in a common header file) which will tell the compiler that a varialble of that name and type will be defined in one of the compiled files, and can be found at a later stage.
in the file where you want to define the variable use:
int my_global = 0; /* always good practice to initalize */
in other files (or a common header) use:
extern int my_global;
Now you can read or write my_global from any file where it is declared.
The header guard stuff is an attempt to move the definition and declaration into the same statement, at your level it is probably best that you get a handle on declaration vs definition before trying to play games like that.