View Single Post
  #2   Spotlight this post!  
Unread 01-04-2004, 13:58
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: multiple definition error in MCC/Linker (possible bug?)

Quote:
Originally Posted by wun
I have just been working on my code, when all of a sudden I started getting multiple definition errors from the linker on a variable named drive_mode.
I searched through all the files involved (grep drive_mode {*.c,*.h}), and found only one definition.
That symptom points to one of two things. Either you have more than one #include for the same .h file (and you're not "protecting" it with #ifdef), or you have added the same .c file to the project twice. The first problem would show up in the code. The second problem would not. Try looking at the project window and make sure you only have each file in there once. If something is duplicated, remove the extra one.