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

3 vues (au cours des 30 derniers jours)
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.

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 18 Avr 2023
Modifié(e) : MathWorks Support Team le 18 Avr 2023
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:

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB Compiler dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by