MATLAB: Unable to start mex32 application

starting mex file

I am running a script in which i need to invoke a mexw32 file. But the following error is thrown which indicates that the application cannot start.
??? Invalid MEX-file (path of the .mexw32 file): This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
What all will be needed to run this file? How do i reinstall the application?

Best Answer

mclmcrrt7x.dll contains the public interface to the MCR. This library must be present on all machines that run applications generated by MATLAB Compiler. Typically, this means that either the MCR is not installed on this machine, or that the PATH does not contain the folder where this DLL is located.
To work around this, install the MCR or modify the path appropriately. The path must contain <mcr_root>/<version>/runtime/<arch>, for example: c:\mcr\v73\runtime\win32|win64.