以下為MathWorks所提出的compiler錯誤訊息與解決方式
整理出來請大家參考一下
Error: An error occurred while shelling out to mex/mbuild (error code = errorno). Unable to build executable (specify the -v option for more information). The Compiler reports this error if mbuild or mex generates an error.
Error: An error occurred writing to file "filename": reason. The file could 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.
Error: Cannot recompile M-file "filename" because it is already in library "libraryname". A procedure already exists in a library that has the same name as the M-file that is being compiled. For example:
mcc -x sin.m % Incorrect
Error: Cannot write 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
Error: Could not check out a Compiler license. No additional Compiler licenses are available for your workgroup.
Error: Could not find license file "filename". (Windows only) The license.dat file could not be found in <MATLAB>/bin.
Error: Could not run mbuild. The MATLAB C/C++ Math Library must be installed in order to build stand-alone applications. Install the MATLAB C/C++ Math Library.
Error: File: "filename" not found. A specified file could 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 directory to the search path
Error: File: "filename" is a script M-file which cannot be compiled with the current Compiler. The MATLAB Compiler cannot compile script M-files. To learn how to convert script M-files to function M-files, see Converting Script M-Files to Function M-Files.
Error: File: filename Line: # Column: # != is not a MATLAB operator. Use ~= instead. Use the MATLAB relational operator ~= (not equal).
Error: File: filename Line: # Column: # () indexing must appear last in an index expression. If you use ordinary array indexing () to index into an expression, it must be last in the index expression. For example, you can use X(1).value and X{2}(1), but you cannot use X.value(1) or X(1){2}.
Error: File: filename Line: # Column: # A CONTINUE may only be used within a FOR or WHILE loop. Use Continue to pass control to the next iteration of a for or while loop.
Error: File: filename Line: # Column: # A function declaration cannot appear within a script M-file. There is a function declaration in the file to be compiled, but it is not at the beginning of the file. Scripts cannot have any function declarations; function M-files must start with a function.
Error: File: filename Line: # Column: # Assignment statements cannot produce a result. An assignment statement cannot be used in a place where an expression, but not a statement, is expected. In particular, this message often identifies errors where an assignment was used, but an equality test was intended. For example:
if x == y, z = w; end % Correct
if x = y, z = w; end % Incorrect
Error: File: f
整理出來請大家參考一下
Error: An error occurred while shelling out to mex/mbuild (error code = errorno). Unable to build executable (specify the -v option for more information). The Compiler reports this error if mbuild or mex generates an error.
Error: An error occurred writing to file "filename": reason. The file could 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.
Error: Cannot recompile M-file "filename" because it is already in library "libraryname". A procedure already exists in a library that has the same name as the M-file that is being compiled. For example:
mcc -x sin.m % Incorrect
Error: Cannot write 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
Error: Could not check out a Compiler license. No additional Compiler licenses are available for your workgroup.
Error: Could not find license file "filename". (Windows only) The license.dat file could not be found in <MATLAB>/bin.
Error: Could not run mbuild. The MATLAB C/C++ Math Library must be installed in order to build stand-alone applications. Install the MATLAB C/C++ Math Library.
Error: File: "filename" not found. A specified file could 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 directory to the search path
Error: File: "filename" is a script M-file which cannot be compiled with the current Compiler. The MATLAB Compiler cannot compile script M-files. To learn how to convert script M-files to function M-files, see Converting Script M-Files to Function M-Files.
Error: File: filename Line: # Column: # != is not a MATLAB operator. Use ~= instead. Use the MATLAB relational operator ~= (not equal).
Error: File: filename Line: # Column: # () indexing must appear last in an index expression. If you use ordinary array indexing () to index into an expression, it must be last in the index expression. For example, you can use X(1).value and X{2}(1), but you cannot use X.value(1) or X(1){2}.
Error: File: filename Line: # Column: # A CONTINUE may only be used within a FOR or WHILE loop. Use Continue to pass control to the next iteration of a for or while loop.
Error: File: filename Line: # Column: # A function declaration cannot appear within a script M-file. There is a function declaration in the file to be compiled, but it is not at the beginning of the file. Scripts cannot have any function declarations; function M-files must start with a function.
Error: File: filename Line: # Column: # Assignment statements cannot produce a result. An assignment statement cannot be used in a place where an expression, but not a statement, is expected. In particular, this message often identifies errors where an assignment was used, but an equality test was intended. For example:
if x == y, z = w; end % Correct
if x = y, z = w; end % Incorrect
Error: File: f