Go to Post I'm going through waves of excitment and panic all at the same time. - je2164 [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 25-01-2013, 12:20
Crossle86's Avatar
Crossle86 Crossle86 is offline
Software Engineer
AKA: Richard Corn
FRC #4450 (Olympia Robotics Federation)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Olympia, WA.
Posts: 92
Crossle86 is an unknown quantity at this point
Angry Unresolved external references

Experienced C++ programmer but rookie at WR/cRio. Successful compile and download of sample program. Successful minor modification of sample with compile and download.

Then extended sample by adding two classes defined with header files and the class actual code in .cpp files. Based layout of header and cpp files on WPILib classes. All seems straight forward. Compiles successfully.

However, when downloading to the cRio, the download fails with an unresolved reference error. The reference is a bunch of characters not easily tied to the code. The error appears when I include the header file of one of my new classes into the base "MyRobot" sample class, even if I don't actually use the class in any way. The external reference has the characters LCD in it and my class is working with the LCD display but I can't figure out what the reference it is talking about.

The code compiles and the .o files are all in the make and appear to be compiled into the .out that is downloaded to the cRio.

Finally, if I remove that include from the MyRobot main class, the error still happens. But after restarting WR, the problem does not occur until I add the include of my class header file.
Reply With Quote
  #2   Spotlight this post!  
Unread 25-01-2013, 13:40
jwakeman jwakeman is offline
Registered User
FRC #0063 (Red Barons)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: 16510
Posts: 182
jwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nice
Re: Unresolved external references

Quote:
Originally Posted by Crossle86 View Post
Experienced C++ programmer but rookie at WR/cRio. Successful compile and download of sample program. Successful minor modification of sample with compile and download.

Then extended sample by adding two classes defined with header files and the class actual code in .cpp files. Based layout of header and cpp files on WPILib classes. All seems straight forward. Compiles successfully.

However, when downloading to the cRio, the download fails with an unresolved reference error. The reference is a bunch of characters not easily tied to the code. The error appears when I include the header file of one of my new classes into the base "MyRobot" sample class, even if I don't actually use the class in any way. The external reference has the characters LCD in it and my class is working with the LCD display but I can't figure out what the reference it is talking about.

The code compiles and the .o files are all in the make and appear to be compiled into the .out that is downloaded to the cRio.

Finally, if I remove that include from the MyRobot main class, the error still happens. But after restarting WR, the problem does not occur until I add the include of my class header file.
This thread (http://www.chiefdelphi.com/forums/sh...d.php?t=111664) may not be exactly what you are experiencing but it sounds similar. Basically the moral of the story is just because it "links" in WR doesn't mean all the symbols will be found at run-time..a different paradigm than most people (at least me) are used to.
Reply With Quote
  #3   Spotlight this post!  
Unread 25-01-2013, 14:39
Crossle86's Avatar
Crossle86 Crossle86 is offline
Software Engineer
AKA: Richard Corn
FRC #4450 (Olympia Robotics Federation)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Olympia, WA.
Posts: 92
Crossle86 is an unknown quantity at this point
Re: Unresolved external references

Thanks. That post is a clue.
Reply With Quote
  #4   Spotlight this post!  
Unread 26-01-2013, 11:34
bob.wolff68's Avatar
bob.wolff68 bob.wolff68 is offline
Da' Mentor Man
FRC #1967
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2007
Location: United States
Posts: 157
bob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nice
Re: Unresolved external references

In order to 'decode' the mangled name, get to a console on the robot and use 'c++filtppc' to unmangle the names. Often times mangled names are readable enough to figure out, but the de-mangler is a help.

bob
__________________
~~~~~~~~~~~~~~~~~~~
Bob Wolff - Software from the old-school
Mentor / C / C++ guy
Team 1967 - The Janksters - San Jose, CA
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


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

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