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
Support at http://www.mathworks.com/contact_TS.html
.
The compiler reports this error if mbuild
or mex
generates
an error.
filename
": reasonThe 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 argumentThe 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 foundA 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
use the -I
option to add a folder to the search
path.
filename
" is a script MATLAB file and cannot be compiled with the current CompilerThe compiler cannot compile script MATLAB files.
#
Column: #
A
variable cannot be made storageclass1 after being used as a storageclass2You cannot change a variable's storage class (global/local/persistent). Even though MATLAB allows this type of change in scope, the compiler does not.
For example:
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, or type mcc
-?
at the command prompt.
MATLAB has been installed incorrectly.
The compiler reports this error when startup.m
file
executes functions that alter MATLAB search path, for example, cd
or addpath
.
Hence, startup.m
file cannot execute appropriately
in deployed environment.
Insert the isdeployed
function before the
path altering functions in the startup.m
file and
recompile the application after modifying startup.m
.
You must provide the compiler with the name of the source file(s) to compile.
optionname
" is not a valid -option argumentYou 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,
see mcc
, or type mcc
-?
at the command prompt.
On UNIX®, the MATLAB
and LM_LICENSE_FILE
variables
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.
optionname
option requires an argument (e.g. "proper_example_usage")You have incorrectly used a compiler option. For more information
about compiler options, see mcc
,
or type 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 enable:
, -w disable:
,
and -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 mcc
,
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 -w
option.
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 save
command,
use:
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 -w
option,
see mcc
.
filename
Line: #
Column: #
The #function pragma expects a list of function namesIdentifier: pragma_function_missing_names
This pragma informs the compiler that the specified function(s)
provided in the list of function names will be called through an feval
call.
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 "directoryname
"
firstIdentifier: specified_file_mismatch
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 mcc
command
line and a file with the same base name (filename
)
is found earlier on the search path. This warning is issued in the
following example if the file afile.m
exists in
both dir1
and dir2
,
mcc -m -I /dir1 /dir2/afile.m
Identifier: repeated_file
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
libraryname
" doesn'tIdentifier: missing_lib_sentinel
This warning is generated if the name of the specified library
does not begin with the letters “lib
”.
For example,
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.
Identifier: all_warnings
This warning displays all warnings generated by the compiler. This warning is disabled.
num1
characters, violating the maximum page width (num2
)Identifier: max_page_width_violation
This warning is generated if there are lines that exceed the
maximum page width, num2
. This warning is disabled.
optionname
is ignored in modename
mode (specify -? for
help)Identifier: switch_ignored
This warning is generated if an option is specified on the mcc
command
line that is not meaningful in the specified mode. This warning is
enabled.
pragmaname
”Identifier: unrecognized_pragma
This warning is generated if you use an unrecognized pragma. This warning is enabled.
functionname1
" is a MEX- or P-file being referenced from "functionname2
"Identifier: mex_or_p_file
This warning is generated if functionname2
calls functionname1
,
which is a MEX- or P-file. This warning is enabled.
Identifier: trial_license
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
at http://www.mathworks.com/contact_TS.html
.
These errors appear as
depfun Error: XML error: <message>
Where <message>
is a message returned
by the XML parser. If this error occurs, report it to Technical Support
at MathWorks at http://www.mathworks.com/contact_TS.html
.