View Single Post
  #3   Spotlight this post!  
Unread 03-03-2011, 19:01
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: 671
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: How Does Compiling Work?

Don't know the details of the cRIO platform and the Wind River cross compiler but if it were the Windows platform which I know very well, the compiler compiles the source code into machine code for the target platform. If the code calls some sort of library, then the generated code needs to link to the library code. There are two types of linking: static linking and dynamic linking. Static linking incorporates the library code into the main code as if it is part of your program. So all the calls to the library functions are resolved at compile/link time. Dynamic linking means the actual library code is not incorporated into the main code. Instead, the main code is linked to a stub library which get resolved when your program is loaded into memory at which time, all the stub functions got patched to point to the real library code already in memory. I believe the WPI library is part of the cRIO image. If for some reason the stub library you linked to is a different version from the actual library in the cRIO image, you may have unresolved symbols. But you would not kow until runtime when the dynamic linking takes place.
__________________
Reply With Quote