View Single Post
  #1   Spotlight this post!  
Unread 26-01-2010, 11:08
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: Help interpreting load time error

I have a few things:
  • This is only slightly related to your problem, but if you're going to implement an Autonomous() or OperatorControl() in MyRobot, you'll need to make these functions virtual in TrcRobot. The deconstructor for MyRobot (MyRobot::~MyRobot) also won't be called unless you make a virtual deconstructor in TrcRobot. Make sure to check inheritence for stuff like this.
  • An "undefined symbol" basically means that the program can't find a function or piece of code where it thinks there should be one. This could be caused by different things:
    • A header file contains the definition of a function, and the source files either don't have the function at all or the function has a different definition in the source files. (This is usually caught during compile-time though).
    • Your versions are off. The code's looking for something in the WPI library where it shouldn't be. Make sure both your robot and your WindRiver workbench have the newest updates.

Taking a second look at it, though, I thought of this:

Since the undefined symbol is "_ZTV8TrcRobot.", I'd guess this is caused by neither of the above possibilities, but something involving inheritance. Put constructors in both TrcRobot and MyRobot (you only have one in MyRobot right now). The START_ROBOT_CLASS macro instantiates the class you give it, which will call not just call the base constructor SimpleRobot::SimpleRobot() but also TrcRobot::TrcRobot() and MyRobot::MyRobot(). I'm guessing that after calling the SimpleRobot constructor it looks for the TrcRobot constructor and freaks out when there isn't one.

Let me know if this fixes the problem.
__________________

Last edited by slavik262 : 26-01-2010 at 11:30.
Reply With Quote