MATLAB: LNK1181: cannot open input file ‘mclmcrrt.lib’

cerrorlinklnk1181MATLABmexmex compilermex fileswindows 8

I am getting a linker error 'LNK1181' when trying to compile a MEX file ' buildMex' with Visual Studio 2013 on Windows 8 using MATLAB 8.1 (R2013a).
LINK : fatal error LNK1181: cannot open input file 'mclmcrrt.lib'
C:\PROGRA~1\MATLAB\R2013A\BIN\MEX.PL: Error: Link of 'mexDemo2.exe' failed.
Error using mex (line 206) Unable to complete successfully.
Error in buildMex (line 7) mex mexDemo2.cpp -v SRL_CV_SIM3.lib

Best Answer

You have to place the path containing the mclmcrrt.lib or mclmcrrt.dll file before the MATLAB root path in the system environment variable 'path'. You can use the path editor to achieve the same.
For example, if you use MATLAB R2014a, and the mclmcrrt8_3.dll file resided in the path C:\MATLAB\R2014a\runtime\win64, then you would have to place this path before the MATLAB root path C:\MATLAB\R2014a.
Related Question