MATLAB: Do I get an “Invalid MEX File” error while executing the application which has a dependency on a MEX file

invalidMATLABmexsdk

I am creating a compiled application which uses a MEX file in its operations. While I create it for a 32 bit machine it works fine but when I deploy it on a 64 bit machine I receive the following error:
Invalid MEX-file 'C:\Users\mllopes.000\AppData\Local\Temp\mllopes\mcrCache8.0\DS_GUI5\DS_GUI\FieldSolenoid_Opt_mex.mexw64': The specified module could not be found.
Everything (MEX, M, and the EXE files) was made using the same WIN 7 (x64) machine(using MATLAB 2012b). The executable runs fine on this machine. However, the machine I am trying to deploy the Executable is another WIN 7 (x64) machine that doesn't have MATLAB. It only has the MCR 2012b installed. I am using Microsoft Windows SDK 7.1 as the compiler.
What could be the issue?

Best Answer

This peculiar behavior was because that the MCR was not able to find the MEX file. The MEX file was not able to find a dependency which seems to be related/included with Microsoft Windows SDK 7.1.
Installing the Microsoft Windows SDK 7.1 on the target computer and restarting the machine would resolve the issue.