View Single Post
  #1   Spotlight this post!  
Unread 01-02-2006, 22:07
Smithvillefirst Smithvillefirst is offline
Anthony Peck
FRC #1806 (Smithville First)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Smithville
Posts: 9
Smithvillefirst is an unknown quantity at this point
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