title: fixing libvlc release mode crash with VC2010
body: <p>I am using libVLC in one of my apps which I am compiling with VC2010 (also tried VC2008), the debug mode of my app works great but as soon as I compile to release mode and try to call into libVLC I get a crash.  I asked for help on the vlc forums and someone mentioned this usually points to calling convention differences, however I am not sure what to check to see if this is the case or more importantly how to fix it.</p>
  
  <p>some notes:</p>
  
  <ul>
  <li>I am compiling libVLC using Ubuntu and following the how to guides on the libVLC wiki.</li>
  <li>I'm using libVLC inside a C++ file.</li>
  <li>I've tried compiling libVLC with and without debugging information.</li>
  <li>I've tried calling libvlc_get_version and libvlc_new as my first call, both crash.</li>
  </ul>
  
  <p>Even though I do not have symbols in my release version, I can see the call stack and it is definitely getting messed up as it is showing functions in the stack that are never-ever called which seems to indicate the wrong calling convention but again I'm not sure how to check/fix this.</p>
  
  <p>I'm not sure if it is related but another issue I am having with libvlc is that I am trying to delay load the dll (have tried not doing this for the above problem but it didnt make a difference), i'm adding the linker flags: <code>/DELAYLOAD:libvlc.dll /DELAYLOAD:libvlccore.dll</code>
  , but when the linking occurs I get these warnings:</p>
  
  <pre><code>LINK : warning LNK4199: /DELAYLOAD:libvlc.dll ignored; no imports found from libvlc.dll
  LINK : warning LNK4199: /DELAYLOAD:libvlccore.dll ignored; no imports found from libvlccore.dll
  </code></pre>
  
  <p>However it is definitely linking to the lib and requiring the dll as seen with Dependency Walker (not to mention I am calling into it).. again not sure if this is related but wanted to throw it out there as well.</p>
  
  <p>I appreciate any advice/help on this one.  Thanks!</p>