MATLAB: Do I get a missing module error when I try to use LOADLIBRARY on a DLL in MATLAB 7.13 (R2011b)

dllfoundloadlibraryMATLABmodulemsvcr100.dllmsvcr100d.dllnotspecified

When I try to load a DLL using LOADLIBRARY, I get the following error:
 
Error: The specified module could not be found
After investigating with dependency walker, I found that MSVCR100D.dll was missing.

Best Answer

MSVCR100D.dll is the debug version of the Microsoft Visual Studio 2010 runtime library. So it is not available via Microsoft's website, and will not be added if you install the Microsoft Visual Studio 2010 Redistributable. To get your DLL running, you will have to either:
1. Get the full Microsoft Visual Studio 2010 (Express works), which includes the debug version.
or
2. Ask your colleague who compiled the DLL for you to recompile it in release mode (he gave you the debug mode), then download the 2010 Redistributable. The DLL should now depend on the release version of the DLL, MSVCR100.DLL, which is packaged in the redistributable.