Exactly. Put the int foo; declaration in one (and only one) .c file. That actually allocates the memory space in the program for the int. Then put the extern int foo into the .h file. That tells all the other source files that there really is a variable called foo and it's an int.
-David On Wed, 26 Jan 2005 12:08:13 -0600, Richard Lindsey <[EMAIL PROTECTED]> wrote: > Shouldn't you be declaring the variables themselves in some .c file or > something, and putting the extern reference into merc.h like you have it > above? Otherwise, wouldn't they put all the globals in db.c into merc.h > instead? Maybe this is causing some weird conflicts since every single > file w/ merc.h included has the variable defined in its own global scope > (for that file) as well as an extern reference to those variables in the > global scope of the program... Just an idea... > > Richard Lindsey

