title: Function call jumps to the wrong function
body: <p>I am compiling a c++ static library in vs2008, and in the solution i also have a startup project that uses the lib, and that works fine. </p>
  
  <p>But when using the lib in another solution i get an run-time check failure.
  "The value of ESP was not properly saved across a functioncall"
  Stepping through the code i noticed a function foo() jumping to bar() instead right before the crash. The functions in question are just regular functions and no function pointers.</p>
  
  <p>Anyone has any clue what might be going on, and why it works when using the lib's from the same solution?</p>
  
  <p>edit: the functions (methods) are part of a class, if that helps.</p>