2

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.

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).

Debug Configuration: /MDd Release Configuration: /MD

Any ideas?

Amro
  • 123,847
  • 25
  • 243
  • 454
KawaRacer
  • 21
  • 1
  • 2

3 Answers3

2

Yeah. You did not turn your project to 64 bit in the release configuration.

TomTom
  • 61,059
  • 10
  • 88
  • 148
1

I had the same problem. Using dependency walker I've found that it wasn't my program, it was Oracle's oraocci11d.dll that was compiled using visual studio 9, so it needed msvcr90d.dll. I just downloaded the library compiled in VS 2010

ibrabeicker
  • 1,786
  • 2
  • 19
  • 31
0

You may have a manifest file somewhere that is wrongfully specifying the architecture (as x86) of libmsvcrt.

rubenvb
  • 74,642
  • 33
  • 187
  • 332