title: The procedure entry point could not be found
body: <p>I have a program that I am writing <code>program.exe</code>, it loads a dll <code>lib.dll</code>. When I run <code>program.exe</code> in debug mode everything works fine. When I try to run in release mode I get an error:</p>
  
  <blockquote>
    <p><code>The procedure entry point ... could not be located in the dynamic
    link library lib.dll</code>.</p>
  </blockquote>
  
  <p>When I open the dll in dependency walker that exact function with all the same weird symbols is there. I looked at the module window in visual studio to make sure that I am not loading the dll from the wrong directory but that is not the case. I compiled both the dll and exe with the same compiler (Visual Studio 2012) so that is not the problem either. What could be causing this?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I converted <code>lib.dll</code> into a static library and everything works fine. I give up!</p>