View Single Post
  #9   Spotlight this post!  
Unread 09-03-2011, 01:09
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: How Does Compiling Work?

The thing that makes the VxWorks (and Linux as well) different from what you see on Windows is that even though WPILib is statically linked with your application, the loader has the chance to resolve any missing symbols at runtime. Because of this, even if the linker knows that it can't find all the WPILib symbols when it's linking (because it's the wrong version of the FPGA for instance) it doesn't know that those symbols won't exist when actually loading it, so you get no error.

On Windows, all symbols you want to link against must exist when the application is linked. That's why on Windows you have a stub library to provide those symbols. This allows the link to know if the symbols you expect to have are there and you will get an error when building your program if they aren't. There are no stub libraries on VxWorks. There's always the case where the stub library and the DLL are inconsistent, and you'll get runtime loader errors in that case on Windows.
Reply With Quote