compiler錯誤訊息與解決方式

转载 2004年08月03日 01:23:00
以下為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: filename Line: # Column: # 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.

Error: File: filename Line: # Column: # An array for multiple LHS assignment must be a vector. If the left-hand side of a statement is a multiple assignment, the list of left-hand side variables must be a vector. For example:

[p1, p2, p3] = myfunc(a)% Correct
[p1; p2; p3] = myfunc(a)% Incorrect

Error: File: filename Line: # Column: # An array for multiple LHS assignment cannot be empty. If the left-hand side of a statement is a multiple assignment, the list of left-hand side variables cannot be empty. For example:

[p1, p2, p3] = myfunc(a)% Correct
[ ] = myfunc(a)% Incorrect

Error: File: filename Line: # Column: # An array for multiple LHS assignment cannot contain token. If the left-hand side of a statement is a multiple assignment, the vector cannot contain this token. For example, you cannot assign to constants.

[p1] = myfunc(a)% Correct
[3] = myfunc(a)% Incorrect

Error: File: filename Line: # Column: # Expected a variable, function, or constant, found "string". There is a syntax error in the specified line. See the online MATLAB Function Reference pages.

Error: File: filename Line: # Column: # Expected one of , ; % or EOL, got "string". There is a syntax error in the specified line. See the online MATLAB Function Reference pages.

Error: File: filename Line: # Column: # Functions cannot be indexed using {} or . indexing. You cannot use the cell array constructor, {}, or the structure field access operator, ., to index into a function.

Error: File: filename Line: # Column: # Indexing expressions cannot return multiple results. There is an assignment in which the left-hand side takes multiple values, but the right-hand side is not a function call but rather a structure access. For example:

[x, y] = f(z) % Correct
[x, y] = f.z % Incorrect

Error: File: filename Line: # Column: # Invalid multiple left-hand-side assignment. For example, you try to assign to constants

[] = sin(1);% Incorrect

Error: File: filename Line: # Column: # MATLAB assignment cannot be nested. You cannot use a syntax such as x = y = 2. Use y = 2, x = y instead.

Error: File: filename Line: # Column: # Missing operator, comma, or semicolon. There is a syntax error in the file. Syntactically, an operator, a comma, or a semicolon is expected, but is missing. For example:

if x == y, z = w; end % Correct
if x == y, z = w end % Incorrect

Error: File: filename Line: # Column: # Missing variable or function. An illegal name was used for a variable or function. For example:

x % Correct
_x % Incorrect

Error: File: filename Line: # Column: # Only functions can return multiple values. In this example, foo must be a function, it cannot be a variable.

[a, b] = foo;

Error: File: filename Line: # Column: # "string1" expected, "string2" found. There is a syntax error in the specified line. See the online MATLAB Function Reference pages accessible from the Help browser.

Error: File: filename Line: # Column: # The end operator can only be used within an array index expression. You can use the end operator in an array index expression such as sum(A( :, end)). You cannot use the end operator outside of such an expression, for example: y = 1 + end.

Error: File: filename Line: # Column: # The name "parametername" occurs twice as an input parameter. The variable names specified on the function declaration line must be unique. For example:

function foo(bar1, bar2)% Correct
function foo(bar, bar)% Incorrect

Error: File: filename Line: # Column: # The name "parametername" occurs twice as an output parameter. The variable names specified on the function declaration line must be unique. For example:

function [bar1, bar2] = foo% Correct
function [bar, bar] = foo% Incorrect

Error: File: filename Line: # Column: # The "operatorname" operator may only produce a single output. The primitive operator produces only a single output. For example:

x = 1:10; % Correct
[x, y] = 1:10; % Incorrect

Error: File: filename Line: # Column: # The PERSISTENT declaration must precede any use of the variable variablename. In the text of the function, there is a reference to the variable before the persistent declaration.

Error: File: filename Line: # Column: # The single colon operator ( : ) can only be used within an array index expression. You can only use the : operator by itself as an array index. For example: A( : ) = 5; is okay, but y = :; is not.

Error: File: filename Line: # Column: # The variable variablename was mentioned more than once as an input. The argument list has a repeated variable. For example:

function y = myfun(x, x) % Incorrect

Error: File: filename Line: # Column: # The variable variablename was mentioned more than once as an output. The return value vector has a repeated variable. For example:

function [x, x] = myfun(y) % Incorrect

Error: File: filename Line: # Column: # This statement is incomplete. Variable arguments cannot be made global or persistent. The variables varargin and varargout are not like other variables. They cannot be declared either global or persistent. For example:

global varargin % Incorrect

Error: File: filename Line: # Column: # Variable argument (varargin) must be last in input argument list. The function call must specify the required arguments first followed by varargin. For example:

function [out1, out2] = example1(a, b, varargin)% Correct
function [out1, out2] = example1(a, varargin, b)% Incorrect

Error: File: filename Line: # Column: # Variable argument (varargout) must be last in output argument list. The function call must specify the required arguments first followed by varargout. For example:

function [i, j, varargout]= ex2(x1, y1, x2, y2, val)% Correct
function [i, varargout, j]= ex2(x1, y1, x2, y2, val)% Incorrect

Error: File: filename Line: # Column: # variablename has been declared both as GLOBAL and PERSISTENT. Declare variables as either global or persistent.

Error: Found illegal whitespace character in command line option: "string". The strings on the left and right side of the space should be separate arguments to MCC. For example:

mcc('-A', 'none')% Correct
mcc('-A none')% Incorrect

Error: Improper usage of option -optionname. Type "mcc -?" for usage information. You have incorrectly used a Compiler option. For more information about Compiler options, see MATLAB Compiler Option Flags or type mcc -? at the command prompt.

Error: "languagename" is not a known language. The dialect option was given a language argument for which there is no support yet. For example:

mcc -m -D japanese sample.m % Correct
mcc -m -D german sample.m % Incorrect

Error: libraryname library not found. MATLAB has been installed incorrectly.

Error: MEX-File "mexfilename" cannot be compiled into P-Code. Only M-files can be compiled into P-code; MEX-files cannot be compiled into P-code.

Error: No source files were specified (-? for help). You must provide the Compiler with the name of the source file(s) to compile.

Error: On UNIX, the name of an MLIB-file must begin with the letters "lib". 'filename' does not adhere to this rule. The mlib file specified on the command line does not start with the letters "lib" and the file being compiled uses procedures in that library.

Error: "optionname" is not a valid -option option argument. You must use an argument that corresponds to the option. For example:

mcc -L Cpp ...% Correct
mcc -L COBOL ...% Incorrect

Error: Out of memory. 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 could alleviate this problem.

Error: Previous warning treated as error. When you use the -w error option, this error displays immediately after a warning message.

Error: The argument after the -option option must contain a colon. The format for this argument requires a colon. For more information, see MATLAB Compiler Option Flags or type mcc -? at the command prompt.

Error: The environment variable MATLAB must be set to the MATLAB root directory. 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.

Error: The file filename cannot be written. When generating an mlib file, the Compiler cannot write out the mlib file.

Error: The license manager failed to initialize (error code is errornumber). You do not have a valid Compiler license or no additional Compiler licenses are available.

Error: The option -option is invalid in modename mode (specify -? for help). The specified option is not available.

Error: The option -option must be immediately followed by whitespace (e.g. "proper_example_usage"). These options require additional information, so they cannot be combined.

-A, -B, -d, -f, -F, -I, -L, -M, -o, -T, -u, -W, -x, -y, -Y, -z

For example, you can use mcc -vc, but you cannot use mcc -Ac annotation:all.

Error: The options specified will not generate any output files.
Please use one of the following options to generate an executable output file:
    -x (generates a MEX-file executable using C)
    -m (generates a stand-alone executable using C)
    -p (generates a stand-alone executable using C++)
    -S (generates a Simulink MEX S-function using C)
-B sgl (generates a stand-alone graphics library executable using C (requires the SGL))
-B sglcpp (generates a stand-alone graphics library executable using C++ (requires the SGL))
-B pcode (generates a MATLAB P-code file)
    Or type mcc -? for more usage information.
Use one of these options or another option that generates an output file(s). See MATLAB Compiler Option Flags or type mcc -? at the command prompt for more information.

Error: The specified file "filename" cannot be read. There is a problem with your specified file. For example, the file is not readable because there is no read permission.

Error: The -option option cannot be combined with other options. The -V2.0 option must appear separate from other options on the command line. For example:

mcc -V2.0 -L Cpp ...% Correct
mcc -V2.0L Cpp ...% Incorrect

Error: The -optionname option requires an argument (e.g. "proper_example_usage"). You have incorrectly used a Compiler option. For more information about Compiler options, see MATLAB Compiler Option Flags or type mcc -? at the command prompt.

Error: This version of MCC does not support the creation of C++ MEX code. You cannot create C++ MEX functions with the current Compiler.

Error: Unable to open file "filename":<string>. There is a problem with your specified file. For example, there is no write permission to the output directory, or the disk is full.

Error: Unable to set license linger interval (error code is errornumber). A license manager failure has occurred. Contact Technical Support at The MathWorks with the full text of the error message.

Error: Uninterpretable number of inputs set on command line "commandline". When generating a Simulink S-function, the inputs specified on the command line was not a number. For example:

mcc -S -u 2 sample.m % Correct
mcc -S -u a sample.m % Incorrect

Error: Uninterpretable number of outputs set on command line "commandline". When generating a Simulink S-function, the outputs specified on the command line was not a number. For example:

mcc -S -y 2 sample.m % Correct
mcc -S -y a sample.m % Incorrect

Error: Uninterpretable width set on command line "commandline". The argument to the page width option was not interpretable as a number.

Error: Unknown annotation option: optionname. An invalid string was specified after the -A option. For a complete list of the valid annotation options, see MATLAB Compiler Option Flags or type mcc -? at the command prompt.

Error: Unknown typesetting option: optionname. The valid typesetting options available with -F are expression-indent:n, list, page-width, and statement-indent:n.

Error: Unknown warning enable/disable string: warningstring. -w enable:, -w disable:, and -w error: require you to use one of the warning string identifiers listed in the Warning Messages.

Error: Unrecognized option: -option. The option is not one of the valid options for this version of the Compiler. See MATLAB Compiler Option Flags for a complete list of valid options for MATLAB Compiler 3.0 or type mcc -? at the command prompt.

Error: Use "-V2.0" to specify desired version. You specified -V without a version number. You must use -V2.0 if you specify a version number.

Error: versionnumber is not a valid version number. Use "-V2.0". If you specify a Compiler version number, it must be -V2.0. The default is -V2.0.

mcc、mbuild和mex命令详解

好多学习MATLAB扩展编程的人经常把这几个命令给搞混淆的,下面我就给大家仔细讲讲,希望呢给大家讲明白! 先简单的说说mcc、mbuild和mex到底怎么回事: mcc将M文件转换...
  • zhuiyuanzhongjia
  • zhuiyuanzhongjia
  • 2016年11月10日 10:37
  • 336

matlab中提示m文件不在current folder下(实际上在)

matlab错误提示 File %% is not found in the current folder or on the matlab path. to run this file, ...
  • wuzh07
  • wuzh07
  • 2015年06月06日 19:26
  • 1580

compiler錯誤訊息與解決方式(MATLAB)

compiler錯誤訊息與解決方式以下為MathWorks所提出的compiler錯誤訊息與解決方式 整理出來請大家參考一下   [color=red]Error: An error occurred...
  • shirley329
  • shirley329
  • 2006年11月06日 04:53
  • 5813

iOS常遇到的錯誤訊息與解決方式

常遇到的錯誤訊息與解決方式 錯誤訊息:Undefined symbols for architecture i386 error 遇到這個錯誤碼代表你Code中有使用到你尚未載入的framework,...
  • Tigre1395
  • Tigre1395
  • 2015年11月04日 22:32
  • 395

phpMyAdmin 配置錯誤解決

短语密码配置:配置文件现在需要一个短语密码$cfg['blowfish_secret'] = '123';将phpmyadmin/libraries/config.default.php    中的$...
  • hbdys
  • hbdys
  • 2010年10月08日 13:06
  • 552

EXP-00091錯誤解決方案

    我們在對數據庫進行導入導出時經常會出現EXP-00091錯誤,      原因:在数据库的服务器端和客户端字符集不同的情况下,导出(dump)数据库表时,会产生这个错误。      解决:(W...
  • wizardlun
  • wizardlun
  • 2008年12月03日 09:02
  • 339

錯誤訊息 Undefined symbols for architecture i386:

出現了一堆類似這樣的錯誤 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ...
  • oqqQuZi1234567
  • oqqQuZi1234567
  • 2013年05月10日 19:03
  • 541

StarUML5存檔錯誤訊息Invalid file name

StarMUL是很好的UML建模工具但如果存檔目錄貨是路徑有中文名稱就會出現Invalid file name,必須記錄在無中文名稱目錄,算是一個小BUG,google時也沒有查到相關錯誤訊息解決辦法...
  • jason0928
  • jason0928
  • 2011年03月29日 21:28
  • 460

如何解決Nios II的Timestamp不match的錯誤訊息

有時候Nios II會出現以下惱人的錯誤訊息:Using cable "USB-Blaster [USB-0]", device 1, instance 0x00Pausing target proc...
  • zhangyanquen
  • zhangyanquen
  • 2010年07月29日 16:45
  • 1420

关于rails安装mysql驱动报错问题

我在本地用的是wamp server的一键包,只使用了mysql的功能,今天在使用   rake db:migrate 时候   先报了个无法执行,查询了下,发现没装mysql的一个gem,执行gem...
  • lemonhere
  • lemonhere
  • 2014年02月12日 16:56
  • 69
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:compiler錯誤訊息與解決方式
举报原因:
原因补充:

(最多只允许输入30个字)