View Single Post
  #6   Spotlight this post!  
Unread 04-03-2011, 00:17
masoug's Avatar
masoug masoug is offline
Food Consumer
FRC #0114
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Planet Earth
Posts: 78
masoug is an unknown quantity at this point
Re: How Does Compiling Work?

Quote:
Originally Posted by mikets View Post
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.
Hmm, stub functions? Like prototypes?
__________________

JabbaScript
Reply With Quote