View Single Post
  #2   Spotlight this post!  
Unread 01-01-2011, 14:00
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: oddest linking issue

Quote:
Originally Posted by byteit101 View Post
I am having an extremely odd issue: If I compile the C++ ZomB sources to an out file, ftp it to the cRIO as ZomB.out, and add it to startupdlls, using DBPacket mode will prevent IsDisabled() (and presumably IsEnabled()) from changing, and only Disabled will execute. On the other hand, if I take the exact same source files, and compile them with the main file, making one out file, everything works! Source files attached.
This sounds like a symbol-name collision in the ZomB code. VxWorks uses a dynamic loading mechanism wherein symbols may be loaded multiple times into the symbol table from multiple applications. When a symbol is searched, it takes the first symbol in the table that is encountered. However, the linker will resolve to potentially a different symbol by the same name. Hence, the linked symbol is different (at a different location in memory) than the "loaded" symbol.

So, I'd look for a symbol name clash between the two images. You can use the "nm-ppc" facility from the DOS command line or the lkup "symbolname" facility from the VxWorks shell (the RS-232 terminal or the "host shell" -- the "->i" button on the menu bar).

HTH,

Mike
Reply With Quote