extern static bool?

If I have a global variable that is defined as static bool MyLabel;, how would I add it to a header so that it can be accessed by multiple files?

Normally I would use the extern keyword in the header, but that doesn't work in combination with static as it gives the following errors in VS2008:
MyFile.h(###) : error C2159: more than one storage class specified
MyFile.cpp(###) : warning C4211: nonstandard extension used : redefined extern to static


Background:
I have a file of 15,000 lines (written in a c-style) with hundreds of global variables that I am tasked with cleaning up. I've decided that my first step will be separating this monster into several files of a manageable size. I will remove the need for global variables later.
Use extern in the header and leave out the static keyword.
Thanks, I was wondering what static does when it is on a global variable.
The extern keyword tells the compiler that this variable can be found (linked) somewhere within your program.

The static keyword makes a variable invisible for the linker.

Hence extern and static exclude each other

Take a look at this: http://en.wikipedia.org/wiki/Static_variable
Thanks for the clarification coder777.
Topic archived. No new replies allowed.