MATLAB: Do I receive an error referencing mex.pl when I try to compile with MATLAB Compiler 4.1.1 (R14SP1+)

compilecompilingMATLAB Compilermexoutputtarget

When I try to compile an application using the command:
mcc -md C:\TEMP\ magicsquare.m
I receive the following error message:
D:\APPLICATIONS\MATLAB701\BIN\WIN32\\..\WIN32\MEX.PL: Error: No file names given.
'-e' is not recognized as an internal or external command,
operable program or batch file.
Error: An error occurred while shelling out to mbuild (error code = 1).
Unable to build executable.
??? Error executing mcc, return status = 1.

Best Answer

This change has been incorporated into the documentation in Release 14 Service Pack 3 (R14SP3). For previous releases, read below for any additional information:
This error occurs when a backslash (\) is added to the end of the output directory specified with the -d option. To work around this issue, avoid this backslash as in the following command:
mcc -md C:\TEMP magicsquare.m