View Single Post
  #13   Spotlight this post!  
Unread 27-02-2010, 17:19
stevethetinker stevethetinker is offline
Registered User
FRC #1288 (RAVEN)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2004
Location: St. Charles, MO
Posts: 35
stevethetinker is an unknown quantity at this point
Re: replace WPILib part

To answer the original question: when you pull the source for a library file into your project, DON"T DELETE ANYTHING. What happens when you delete something is this: somewhere (doesn't have to be in anything you did) there is likely to be a reference to the thing(s) you delete. The linker notices the references to your new stuff and pulls your new object file in. Then it notices that there is a reference to this something that is satisfied by the original object file in the library and pulls it in too. You get double definitions for the things that appear in both.

The bit about being somewhat correct about inline functions is a dig. It is absolutely correct that you can't just add inline to function declarations - you have to move the body of the function to where it is declared.
Reply With Quote