It's actually quite simple. If you define a variable in a source file (suppose you define int foobar; in Test1.c), outside the scope of any function, then that variable is not local to any function but global to the module. It is accessible by all functions in Test1.c, but it is not by default accessible anywhere else (in Test2.c or Test3.c).

If you want access to it in Test2.c or Test3.c then you have to redefine it, but if you define it in exactly the same way (int foobar; ) then you will get *another* foobar, and a linker error due to a redefined symbol.

So in Test2.c and Test3.c you have to define it as "extern int foobar;" - then the compiler knows not to create a new foobar but just to assume it already exists and let the linker resolve the address.

Now, you appear to be saying that if you *only* define a variable as "extern int glo_Var;" it compiles fine and you get access to it everywhere. This appears to be compiler-dependent; in Visual Studio 2010 if I try this I get an "undefined symbol" error. One of those definitions must actually define glo_Var - you have to miss off the "extern" in one place.

This can make header files slightly tricky; either you have to define variables twice (duplication means you have to maintain both copies of the variable definition, which can lead to bugs if you don't), or you have to muck about with a conditional definition and define the variables as, for example:
Code:
EXTERN int glo_Var;
then for one module, define EXTERN as nothing, and for all other modules define EXTERN as extern, i.e.:
Code:
variable_defs.h:
EXTERN int glo_Var;

Test1.c:
#define EXTERN
#include "variable_defs.h"

Test2.c:
#define EXTERN extern
#include "variable_defs.h"