I'm working on an HCS08 project, using CW 6.2, in C with a few source files and 1 header file containing all the common information, including declarations of some global variables. They're all defined in the header as extern, and declared in the various source files wherever it makes the most sense for them to live.
Whenever I go to compile any of the source files in the project, the compiler gets to the global declarations and spits out "Error: C1005: Illegal storage class". CW help has a fairly useless description of what this means, but from the example and tip given I can guess that the compiler doesn't like my use of extern here, although I can't figure out why.
I've tried moving the globals around in the .h file and the problem follows them, so it's not an issue with a surrounding line of code. I went through the preprocessed files looking for a duplicate name on the declared variables and found nothing.
Can anybody suggest other things I might look for, or clarify under what conditions an extern might result in a C1005 error?