|
Using vars across multiple .c files
We have a few global variables that we want to use in both user_routines.c and tracking.c. We can not seem to declare and access them in a way that the compiler likes. We either get an error saying multiple definitions, or not defined. I've tried defining the var in a globals.h and including that in both .c files, but that doesn't work. I've tried adding extern declarations in my .c files, but no dice there either. I've tried about every combo of declaring in .c and .h files, with and without externs but nothing seems to work. Anybody know what my problem is?
__________________
Anthony Peck
Integration Manager
Team 1806
|