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

3 visualizaciones (últimos 30 días)
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.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 18 de Abr. de 2023
Editada: MathWorks Support Team el 18 de Abr. de 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:

Más respuestas (0)

Categorías

Más información sobre MATLAB Compiler en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by