MATLAB Compiler    

Warning Messages

This section lists the warning messages that the MATLAB Compiler 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 enable the display of warnings related to undefined variables, you can use

To enable all warnings except those generated by the save command, use

To display a list of all the warning message identifier strings, use

For additional information about the -w option, see MATLAB Compiler Option Flags.

Warning: (PM) Warning: message.   (path_manager_warning) The path manager can experience file I/O problems when reading the directory structure (permissions).

Warning: (PMI): message.   (path_manager_inform) This is an informational path manager message.

Warning: A line has number characters, violating the maximum page width width.   (max_page_width_violation) To increase the maximum page width, use the -F page-width:n option and set n to a larger value.

Warning: File: filename Line: # Column: # A BREAK statement appeared outside of a loop. This BREAK is interpreted as a RETURN.   (break_without_loop) The break statement should be used in conjunction with the for or while statements. When not used in conjunction with these statements, the break statement acts as a return from a function.

Warning: File: filename Line: # Column: # The call to function "functionname" on this line could not be bound to a function that is known at compile time. A run-time error will occur if this code is executed.   (no_matching_function) The called function was not found on the search path.

Warning: File: filename Line: # Column: # Attempt to clear value when it has not been previously defined.   (clear_undefined_value) The variable was cleared with the clear command prior to being defined.

Warning: File: filename Line: # Column: # Future versions of MATLAB will require that whitespace, a comma, or a semicolon separate elements of a matrix. Please type "help matrix_element_separators" at the MATLAB prompt for more information.   (separator_needed) It is still possible to leave out all separators when constructing a matrix. For example, [5.5.5] has no separators. It is equivalent to [5.5, 0.5].

Warning: File: filename Line: # Column: # References to "functionname" require the C/C++ Graphics Library when executing in stand-alone mode. You must specify -B sgl or -B sglcpp in order to use the C/C++ Graphics Library. A run-time error will occur if the C/C++ Graphics Library is not present.   (using_graphics_function) This warning is produced when a Graphics Library call is present in the code. It is only generated when producing the main or library wrapper and not during normal compilation, unless it is specifically enabled.

Warning: File: filename Line: # Column: # References to "variablename" will produce a run-time error because it is an undefined function or variable.   (undefined_variable_or_unknown_function) This warning appears if you refer to a variable but never provide it with a value. The most likely cause of this warning is when you call a function that is not on the path or it is a method function.

Note Inline objects are not supported in this release and will produce this warning when used.

Warning: File: filename Line: # Column: # The #function pragma expects a list of function names.   (pragma_function_missing_names) This pragma informs the MATLAB Compiler that the specified function(s) provided in the list of function names will be called through an feval call. This is used so that the -h option will automatically compile the selected functions.

Warning: File: filename Line: # Column: # The call to function "functionname" on this line passed quantity1 inputs and the function is declared with quantity2. A run-time error will occur if this code is executed.   (too_many_inputs) There is an inconsistency between the number of formal and actual inputs to the function.

Warning: File: filename Line: # Column: # The call to function "functionname" on this line requested quantity1 outputs and the function is declared with quantity2. A run-time error will occur if this code is executed.   (too_many_outputs) There is an inconsistency between the number of formal and actual outputs for the function.

Warning: File: filename Line: # Column: # The clear function cannot process the "optionname" argument in compiled code.   (clear_cannot_handle_flag) You cannot use clear variables, clear mex, clear functions, or clear all in compiled M-code.

Warning: File: filename Line: # Column: # The clear statement did not specifically list the names of variables to be cleared as constant strings. A run-time error will be reported if this code is executed.   (clear_non_constant_strings) Use one of the forms of the clear command that contains the names of the variables to be cleared. Use clear name or clear('name'); do not use clear(name).

Warning: File: filename Line: # Column: # The Compiler does not support the optionname option to save. This option is ignored.   (save_option_ignored) You cannot use -ascii, -double, or -tabs with the save command in compiled M-code.

Warning: File: filename Line: # Column: # The filename provided to load (save) was a cell array or structure index that could possibly expand into a comma separated list. An error will occur at run-time if a comma list is present for the filename.   (load_save_filename) The Compiler needs to know statically the number of variables that are involved in a load or save. If a cell array is involved, the Compiler cannot make that determination, and the generated code may behave differently from MATLAB.

Warning: File: filename Line: # Column: # The "functionname" function is only available in MEX mode. A run-time error will occur if this code is executed in stand-alone mode.   (using_mex_only_function) This warning is produced if you call any built-in function that is only available in mex mode. It is only generated when producing the main or lib wrapper and not during normal compilation, unless specifically enabled.

Warning: File: filename Line: # Column: # The load statement cannot be translated unless it specifically lists the names of variables to be loaded as constant strings.   (load_without_constant_strings) Use one of the forms of the load command that contains the names of the variables to be loaded, for example:

Warning: File: filename Line: # Column: # The logical expression(s) involving OR and AND operators may have returned a different result in previous versions of MATLAB due to a change in logical operator precedence. Use parentheses to make your code insensitive to this change. Please type "help precedence" for more information.   (and_or_precedence) Starting in MATLAB 6.0, the precedence of the logical AND (&) and logical OR (|) operators now obeys the standard relationship (AND being higher precedence than OR) and the formal rules of Boolean algebra as implemented in most other programming languages, as well as Simulink and Stateflow.

Previously, MATLAB would incorrectly treat the expression

It now correctly treats it as

The form, y = a&b | c&d, will not elicit the warning message from the Compiler. We recommend that you use parentheses to get the same behavior now and in the future.

Warning: File: filename Line: # Column: # The MATLAB Compiler does not currently support MATLAB object-oriented programming. References to the method "methodname" will produce a run-time error.   (matlab_method_used) This warning occurs if the file being compiled references a function that has only a method definition.

Warning: File: filename Line: # Column: # The save statement cannot be translated unless it specifically lists the names of variables to be saved as constant strings.   (save_without_constant_strings) Use one of the forms of the save command that contains the names of the variables to be saved, for example:

Warning: File: filename Line: # Column: # The second output argument from the "functionname" function is only available in MEX mode. A run-time error will occur if this code is executed in stand-alone mode.   (unix_dos_second_argument) The DOS command can be called with two output arguments. That form cannot be compiled in stand-alone mode. This warning occurs if the DOS command was called with two output arguments in a file that is being compiled in stand-alone mode. For example:

Warning: File: filename Line: # Column: # This load (save) statement referred to variable "variablename" that was not referenced in the function.   (load_save_unreferenced) This warning occurs if a variable is loaded (saved) via a load (save) command, but then does not occur elsewhere in scope.

Warning: File: filename Line: # Column: # Unmatched "end".   (end_without_block) The end statement does not have a corresponding for, while, switch, try, or if statement.

Warning: File: filename Line: # Column: # Unrecognized Compiler pragma "pragmaname".   (unrecognized_pragma) Use one of the Compiler pragmas as described in Reference.

Warning: File: filename Line: # Column: # name has been used as both a function and a variable, the variable is ignored.   (inconsistent_variable) When a name represents both a function and a variable, it is used as the function only.

Warning: File: filename Line: # Column: # "variablename" has not been defined prior to use on this line.   (undefined_variable) Variables should be defined prior to use.

Warning: Line: # Column: # Function with duplicate name "functionname" cannot be called.   (duplicate_function_name) This warning occurs when an M-file contains more than one function with the same name.

Warning: filename is a P-file being referenced from "filename". NOTE: A link error will be produced if a call to this function is made from stand-alone mode.   (mex_or_p_file) The Compiler cannot generate a call to a function in a P-file for stand-alone code. The warning occurs if a call to a function that is defined in a P-file is detected.

Warning: M-file "filename" was specified on the command line with full path of "pathname", but was found on the search path in directory "directoryname" first.   (specified_file_mismatch) The Compiler detected an inconsistency between the location of the M-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 pathname 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.

Warning: No M-function source available for "functionname", assuming function [varargout] = functionname(varargin) NOTE: This will produce a link error in stand-alone code unless you provide a handwritten definition for this function.   (using_stub_function) The Compiler found a .p or .mex version of the function and is substituting a generic function declaration in its place.

Warning: Overriding the -F page-width setting to width due to presence of -A line:on setting.   (page_width_override) The -A line:on setting overrides the page width. This warning reminds you that the -F setting, although present, has no effect.

Warning: The function "functionname" is an intrinsic MATLAB function. The signature of the function found in file "filename" does not match the known signature for this function:
    known number of inputs = quant1,found number of inputs = quant2
    known number of outputs = quant1found number of outputs = quant2
    known varargin used = quant1,found varargin used = quant2
    known varargout used = quant1,found varargout used = quant2
    known nargout used = quant1,found nargout used = quant2.
  (builtin_signature_mismatch) When compiling an M-file that is contained in the MathWorks libraries, the number of inputs/outputs and the signatures to the function must match exactly.

Warning: The file filename was repeated on the Compiler command line.   (repeated_file) This warning occurs when the same filename appears more than once on the compiler command line. For example:

Warning: The name of a shared library should begin with the letters "lib". "libraryname" doesn't.   (missing_lib_sentinel) This warning is generated if the name of the specified library does not begin with the letters "lib". This warning is specific to UNIX and does not occur on Windows. For example:

Warning: The option optionname is ignored in modename mode (specify -? for help).   (switch_ignored) Modename = 1.2 or 2.0. Certain options only have meaning in one or the other mode. For example, if you use the -e option, you can't use the -V2.0 option. For more information about Compiler options, see MATLAB Compiler Option Flags.

Warning: The specified private directory is not unique. Both "directoryname1" and "directoryname2" are found on the path for this private directory.   (duplicate_private_directories) The Compiler cannot distinguish which private function to use. For more information, see Compiling Private and Method Functions.


  Compile-Time Errors Run-Time Errors