View Single Post
  #2   Spotlight this post!  
Unread 15-01-2007, 15:51
JSonntag JSonntag is offline
Registered User
FRC #0486 (Positronic Panthers)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: United States
Posts: 16
JSonntag is on a distinguished road
Send a message via AIM to JSonntag
Re: "extern" linking issues.

go to the .c file that you are trying to get the data to and at the top, declare an extern variable that is the same name as the variable in the tracking.c file.

example:

say in tracking.c i have a global variable called servo_position that i want to get to user_routines.c

i just go to user routines and type:

extern unsigned char servo_position;

then i can use the variable in user_routines.c

you do not put extern in front of the variable in tracking.c or else you will get an error