MATLAB: Do I receive a “Could not find the compiler ‘‘ on the DOS path.” error when building COM objects in MATLAB 7.0.1 (R14SP1)

MATLAB Builder for COM

I am trying to create a COM component using the MATLAB Builder for COM 1.1.2 (R14SP1) with the Microsoft Visual Studio 9.0 Compiler. However, I receive the following error message at the MATLAB command prompt at compile time:
Could not find the compiler "cl" on the DOS path.
Use mex -setup to configure your environment properly.
C:/MATLAB701/BIN/WIN32//../WIN32/MEX.PL: Error: Unable to locate compiler.
Error: An error occurred while shelling out to mbuild (error code = 1).

Best Answer

This happens because Microsoft Visual Studio Compiler (MSVC) 9.0 is not a supported compiler for the MATLAB Builder for COM 1.1.2 (R14SP1).
A list of supported compilers for MATLAB 7.0.1 (R14SP1) may be found at the following URL:
<http://www.mathworks.com/support/compilers/1601_70.html>
As a workaround, use either the MSVC 6.0 Professional Edition with MATLAB 7.0.1 (R14SP1) or uprgrade to MATLAB 7.7 (R2008a) to be able to use the MSVC 9.0 compiler.