This problem impacts MATLAB users with the following combination of software on 64-bit Windows (win64):
- Visual C++ 2010 Express
- Microsoft Windows SDK 7.1
- Visual Studio 2010 SP1
There is a bug in the installer for Visual Studio 2010 SP1. The installer will delete the 64-bit compiler previously installed by the SDK, or prevent the compiler from being later installed by the SDK.
This will prevent MEX and other products and features dependent on a compiler from functioning. "mex –setup" will continue to locate the Visual C++ compiler, but a "mex" call will later fail with a message like the following:
Error: Could not find the compiler "cl" on the DOS path.
Use mex -setup to configure your environment properly.
C:\Program Files\MATLAB\R2010B\BIN\MEX.PL: Error: Unable to locate compiler.
Microsoft has issued an update to address this issue. It is available for download at:
After downloading and installing the update, MEX and other capabilities should work as anticipated.