除了“成功”语句外,MATLAB是否禁止MEX编译输出?

时间:2016-06-26 11:14:18

标签: c matlab compilation compiler-warnings mex

我使用传统代码工具使用命令legacy_code('generate_for_sim',def)(描述here)将C代码转换为MEX文件。但是,C编译器提供了许多警告,这些警告实际上并不会阻止编译的程序正确运行。我想压制这些警告。特别是,输出目前看起来像这样(我用****替换敏感信息):

### Start Compiling *****************************
    mex(*****************************)
Building with 'MinGW64 Compiler (C)'.

*****************************:44:6: note: expected 'int *' but argument is of type 'idxint *'
*****************************
   ^
In file included from *****************************:42:0:
*****************************:44:6: note: expected 'int *' but argument is of type 'idxint *'
*****************************
   ^
In file included from *****************************:42:0:
*****************************:44:6: note: expected 'int *' but argument is of type 'idxint *'
 *****************************
      ^

MEX completed successfully.
    mex(*****************************)
Building with 'MinGW64 Compiler (C)'.
MEX completed successfully.
    mex(*****************************)
Building with 'MinGW64 Compiler (C)'.
MEX completed successfully.
    mex(*****************************)
Building with 'MinGW64 Compiler (C)'.
MEX completed successfully.
    mex(*****************************)
Building with 'MinGW64 Compiler (C)'.
MEX completed successfully.
    mex(*****************************)
Building with 'MinGW64 Compiler (C)'.
MEX completed successfully.
    mex(*****************************)
Building with 'MinGW64 Compiler (C)'.

C:*****************************: In function 'CheckDataTypes':
C:*****************************:809:5: warning: this decimal constant is unsigned only in ISO C90
     *****************************
     ^
C:*****************************:809:5: warning: this decimal constant is unsigned only in ISO C90

MEX completed successfully.
### Finish Compiling sfun_ecos
### Exit
All done
但是,我希望只输出开始和结束(向用户表明编译成功),而不显示所有中间信息和警告。结果应该是:

### Start Compiling *****************************
MEX completed successfully.
### Finish Compiling sfun_ecos
### Exit
All done

提前感谢您帮助我实现这一目标。

0 个答案:

没有答案