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.

This thread (http://www.chiefdelphi.com/forums/showthread.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.

Thanks. That post is a clue.

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