How do I disable the unsupported compiler warning message generated by the MEX command in MATLAB 7.13 (R2011b)?

5 ビュー (過去 30 日間)
I am using GCC 4.4.1, which is an unsupported compiler for MATLAB 7.13 (R2011b). When I type the following command in MATLAB
mex yprime.c
I receive a warning message:
Warning: You are using gcc version "4.4.1". The version
currently supported with MEX is "4.3.4".
For a list of currently supported compilers see:
<http://www.mathworks.com/support/compilers/current_release/>
I tried to disable this warning using the following MATLAB command
warning off last
but receive an error message:
Error using warning
The last warning issued had an empty warning identifier, or no
warnings have yet been issued.
I would like to disable this warning message.

採用された回答

MathWorks Support Team
MathWorks Support Team 2011 年 11 月 16 日
The ability to suppress this warning message is not available inside MATLAB.
To work around this issue,
1. Open the file named "mex" found in the $MATLABROOT/bin directory, where $MATLABROOT is the MATLAB root directory on your machine, as returned by executing the following at the MATLAB Command Prompt:
matlabroot
2. Navigate to Lines 402-409 of the file. The error message is being printed from the if-statement contained on these lines:
if (need_to_warn == 1)
{
printf("\n");
printf("Warning: You are using gcc version \"%s\". The version\n", version_number);
printf(" currently supported with %s is \"%s\".\n", toolName, versions[2]);
printf(" For a list of currently supported compilers see: \n");
printf(" <http://www.mathworks.com/support/compilers/current_release/\n\n http://www.mathworks.com/support/compilers/current_release/\n\n">);
}
Commenting the above lines of code will suppress the warning in MATLAB.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Compiler についてさらに検索

製品


リリース

R2011b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by