This appendix lists and describes error messages and warnings generated by the compiler. Compile-time messages are generated during the compile or link phase. It is useful to note that most of these compile-time error messages should not occur if the MATLAB® software can successfully execute the corresponding MATLAB file.
Use this reference to:
Confirm that an error has been reported
Determine possible causes for an error
Determine possible ways to correct an error
When using MATLAB
Compiler SDK™, if you receive an internal
error message, record the specific message and report it to Technical
The compiler reports this error if
The file can not be written. The reason is provided by the operating system. For example, you may not have sufficient disk space available to write the file.
filename" because MCC has already created a file with that name, or a file with that name was specified as a command line argument
The compiler has been instructed to generate two files with the same name. For example:
mcc -W lib:liba liba -t % Incorrect
No additional MATLAB Compiler SDK licenses are available for your workgroup.
filename" not found
A specified file can not be found on the path. Verify that the
file exists and that the path includes the file's location. You can
-I option to add a folder to the search
filename" is a script MATLAB file and cannot be compiled with the current Compiler
The compiler cannot compile script MATLAB files.
#A variable cannot be made storageclass1 after being used as a storageclass2
You cannot change a variable's storage class (global/local/persistent). Even though MATLAB allows this type of change in scope, the compiler does not.
mcc('-m', '-v', 'hello')% Correct mcc('-m -v', 'hello') % Incorrect
You have incorrectly used a MATLAB
Compiler SDK option. For
more information about MATLAB
Compiler SDK options, see mcc Command Arguments Listed Alphabetically (MATLAB Compiler), or type
-? at the command prompt.
MATLAB has been installed incorrectly.
The compiler reports this error when
executes functions that alter MATLAB search path, for example,
startup.m file cannot execute appropriately
in deployed environment.
isdeployed function before the
path altering functions in the
startup.m file and
recompile the application after modifying
You must provide the compiler with the name of the source file(s) to compile.
optionname" is not a valid -option argument
You must use an argument that corresponds to the option. For example:
mcc -W main ... % Correct mcc -W mex ... % Incorrect
Typically, this message occurs because the compiler requests a larger segment of memory from the operating system than is currently available. Adding additional memory to your system can alleviate this problem.
When you use the
-w error option, this error
appears immediately after a warning message.
The format for this argument requires a colon. For more information,
mcc, or type
-? at the command prompt.
On UNIX®, the
must be set. The
mcc shell script does this automatically
when it is called the first time.
You do not have a valid license or no additional licenses are available.
The specified option is not available.
There is a problem with your specified file. For example, the file is not readable because there is no read permission.
optionnameoption requires an argument (e.g. "proper_example_usage")
You have incorrectly used a compiler option. For more information
about compiler options, see
mcc -? at the command prompt.
The compiler no longer generates MEX-files because there is no longer any performance advantage to doing so. The MATLAB JIT Accelerator makes compilation for speed obsolete.
There is a problem with your specified file. For example, there is no write permission to the output folder, or the disk is full.
A license manager failure has occurred. Contact Technical Support with the full text of the error message.
-w error: require you to use one of the warning
string identifiers listed in Warning Messages.
The option is not a valid option. See
mcc, for a complete list of
valid options for MATLAB
Compiler SDK, or type
mcc -? at
the command prompt.
This section lists the warning messages that MATLAB
Compiler SDK can
generate. Using the
-w option for
you can control which messages are displayed. Each warning message
contains a description and the warning message identifier string (in
parentheses) that you can enable or disable with the
For example, to produce an error message if you are using a trial MATLAB
Compiler SDK license
to create your standalone application, you can use:
mcc -w error:trial_license -mvg hello
To enable all warnings except those generated by the
mcc -w enable -w disable:trial_license ...
To display a list of all the warning message identifier strings, use:
mcc -w list
For additional information about the
#The #function pragma expects a list of function names
This pragma informs the compiler that the specified function(s)
provided in the list of function names will be called through an
This will automatically compile the selected functions.
filename" was specified on the command line with full path of "
pathname", but was found on the search path in directory "
The compiler detected an inconsistency between the location
of the MATLAB file as given on the command line and in the search
path. The compiler uses the location in the search path. This warning
occurs when you specify a full path name on the
line and a file with the same base name (
is found earlier on the search path. This warning is issued in the
following example if the file
afile.m exists in
mcc -m -I /dir1 /dir2/afile.m
This warning occurs when the same file name appears more than once on the compiler command line. For example,
mcc -m sample.m sample.m
This warning is generated if the name of the specified library
does not begin with the letters “
mcc -t -W lib:liba -T link:lib a0 a1
will not generate a warning while
mcc -t -W lib:a -T link:lib a0 a1
will generate a warning.
This warning is specific to UNIX and does not occur on the Windows® operating system.
This warning displays all warnings generated by the compiler. This warning is disabled.
num1characters, violating the maximum page width (
This warning is generated if there are lines that exceed the
maximum page width,
num2. This warning is disabled.
optionnameis ignored in
modenamemode (specify -? for help)
This warning is generated if an option is specified on the
line that is not meaningful in the specified mode. This warning is
This warning is generated if you use an unrecognized pragma. This warning is enabled.
functionname1" is a MEX- or P-file being referenced from "
This warning is generated if
which is a MEX- or P-file. This warning is enabled.
This warning displays the date that the deployed application will expire. This warning is enabled.
These errors originate directly from the MATLAB Runtime/Dispatcher.
If one of these error occurs, report it to Technical Support at MathWorks
These errors appear as
depfun Error: XML error: <message>
<message> is a message returned
by the XML parser. If this error occurs, report it to Technical Support
at MathWorks at