How can I know what compiler has been chosen previously using the "mbuild -setup" function?

3 ビュー (過去 30 日間)
I use "mbuild -setup" to choose the compiler. I work with different compilers to build standalone MATLAB applications. I am forced to run "mbuild -setup" every time to ensure that I am using the right compiler. I would like to know if there is any command that I could use to find out the compiler that is currently chosen.

採用された回答

MathWorks Support Team
MathWorks Support Team 2023 年 4 月 18 日
編集済み: MathWorks Support Team 2023 年 4 月 18 日
There is no function available to find out the compiler chosen using "mbuild -setup" in MATLAB Compiler.
To work around this issue, use the following code to read the first line of "compopts.bat" file which provides the information about the compiler chosen:
fid = fopen(fullfile(prefdir,'compopts.bat'),'r');
fgetl(fid);
disp(fgetl(fid));
fclose(fid);
For all platforms other than Windows, MATLAB Compiler has generally only supported one compiler for each release so there is no need to determine which compiler has been selected with "mbuild -setup" as there is only one option. For details on supported compilers please see the following web page:

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by