title: Why visual studio is linking MSVCR90.dll (x86) on 64 Bit platform?
body: <p>I'm writing a library for MATLAB (mex-file). While developing I used the debug profile in Visual Studio 2008. Everything is fine in debug mode. MATLAB executes my library correctly. </p>
  
  <p>When I switch to relase mode in visual studio, MATLAB is unable to load my library (dll named as .mexw64). Using Dependency Walker I saw that the debug version is linking the MSVCR90D.dll (x64) but the release version is linking the MSVCR90.dll (x86). </p>
  
  <p>Debug Configuration: /MDd
  Release Configuration: /MD</p>
  
  <p>Any ideas?</p>