Go to Post SELECT YOUR STRATEGY BEFORE YOUR ROBOT DESIGN. - Kims Robot [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 27-01-2010, 01:52
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Help interpreting load time error

Quote:
Originally Posted by mikets View Post
I am expecting to see compiler errors if I made mistakes. But the compiler didn't complain and instead I got load time error of undefined symbol. Can somebody tell me what it means? Thanks.
The reason the compiler (it's actually the linker that would complain) is not giving you an error is that VxWorks links at load time instead of requiring a stub library for external linkage. Any symbols that are not defined when building are simply assumed to exist in the environment that you program will load in. If that does not hold true, you get errors from the loader.
Reply With Quote
  #2   Spotlight this post!  
Unread 27-01-2010, 04:15
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Help interpreting load time error

I see. That makes sense now. So according to the linker error, am I missing the constructor of TrcRobot then?
Reply With Quote
  #3   Spotlight this post!  
Unread 27-01-2010, 04:49
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Help interpreting load time error

No... it's not the constructor. It's the vtable and the typeinfo.

If you run the tool C:\WindRiver\gnu\3.4.4-vxworks-6.3\x86-win32\bin\c++filtppc.exe and pass in the mangled name, it will tell you what it is in plain text.
Reply With Quote
  #4   Spotlight this post!  
Unread 27-01-2010, 23:00
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Help interpreting load time error

Yes, you are right, it is the typeinfo and vtable. But what does it mean if these symbols are missing? TrcRobot is the base class of MyRobot. Why would the vtable of the TrcRobot be missing?
Reply With Quote
  #5   Spotlight this post!  
Unread 28-01-2010, 18:06
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Help interpreting load time error

Quote:
Originally Posted by mikets View Post
Yes, you are right, it is the typeinfo and vtable. But what does it mean if these symbols are missing? TrcRobot is the base class of MyRobot. Why would the vtable of the TrcRobot be missing?
You have not included the actual code, so it's a little hard to say, but I would speculate that you don't have a virtual destructor defined for TrcRobot. Since the RobotBase and SimpleRobot destructors are virtual and TrcRobot inherits from them and is then inherited from by MyRobot, you must have a virtual destructor at all levels of the hierarchy. Leaving it out of one class in the middle won't work. The default destructor is not virtual.

-Joe
Reply With Quote
  #6   Spotlight this post!  
Unread 28-01-2010, 18:10
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Help interpreting load time error

Yes, I found it out yesterday. I thought I had an empty destructor defined but I missed that one. Thanks for the help.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Resolve load conflict error ? ferc Programming 1 15-01-2010 21:16
Help getting C++ program to load tgwicklund C/C++ 4 02-02-2009 23:24
**FIRST EMAIL**/Important Pit Load In and Load Out Information Mark McLeod FIRST E-Mail Blast Archive 7 11-04-2008 08:16
HELP!!!!! Taigene motor load DPTeam270Driver Motors 40 12-02-2008 10:53
180:Error: syntax error help! seanl Programming 8 04-02-2007 11:31


All times are GMT -5. The time now is 14:10.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi