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
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 CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by