The problem is neither ANSI nor VS.
You must differentiate between definitions and code (.c files), and declarations (in .h files).
Handle global variables just like handling global functions. Declare them in a header file and define them in the corresponding source file:
extern int a;
int a = 10;
If you now want to use the global variable
from within another module, include the header file:
printf("a = %d\n", a);
If you put something like 'int a = 10;' into a header file, each file that includes this header file will have its's own copy of the variable. Then it is not global, but local to each module.