Matlab Compiler error during converting Mat files into exe

7 visualizaciones (últimos 30 días)
Satyendra Tiwari
Satyendra Tiwari el 27 de Nov. de 2020
Respondida: Ajay Neeli el 5 de En. de 2021
Hi!
I was trying to convert Mat files into .exe file by Matlab comiler R2019 which gives below error:
Error using BuildDeploy (line 11)
Error while determining required deployable files. Compilation terminated.
Details:
Error using matlab.depfun.internal.SimulinkModelInspector (line 11)
Simulink is not avaiable.
Then i used simple function to do same but same error was getting.Example
function MyNewApp
fprintf('Hello World!\n');
end
But nither my code nor example have simlink.
The command to compile is :
mcc -m MyNewApp.m
This works well for R2015b - the executable runs as expected - but not for R2019b
When disabling the constructor code of the file SimulinkModelInspector.m. since this was mentioned in an error message - the behavior changes:
function obj = SimulinkModelInspector(objs, fcns, flags)
% if ~license('test', 'Simulink')
% %error(message());
% error('Simulink is not avaiable.');
% end
%
% % Pass on the input arguments to the superclass constructor
% obj@matlab.depfun.internal.MwFileInspector(objs, fcns, flags);
end
The command - taken from doc mcc - now results in following error message:
mcc -m MyNewApp.m
Error while determining required deployable files. Compilation terminated.
Details:
Not enough input arguments.
also this command with more specified options has the same result
mcc -m -W main -T link:exe MyNewApp.m
How can i overcome from this error?
Thanks
  2 comentarios
Walter Roberson
Walter Roberson el 27 de Nov. de 2020
How are you asking for the code to be converted into a .exe ? Which command at the command line, or exactly which App in the Apps section of the command window?
Satyendra Tiwari
Satyendra Tiwari el 27 de Nov. de 2020
Editada: Satyendra Tiwari el 27 de Nov. de 2020
For Exaple:
function MyNewApp
fprintf('Hello World!\n');
end
The command to compile is :
mcc -m MyNewApp.m
This works well for R2015b - the executable runs as expected - but not for R2019b
When disabling the constructor code of the file SimulinkModelInspector.m. since this was mentioned in an error message - the behavior changes:
function obj = SimulinkModelInspector(objs, fcns, flags)
% if ~license('test', 'Simulink')
% %error(message());
% error('Simulink is not avaiable.');
% end
%
% % Pass on the input arguments to the superclass constructor
% obj@matlab.depfun.internal.MwFileInspector(objs, fcns, flags);
end
The command - taken from doc mcc - now results in following error message:
mcc -m MyNewApp.m
Error while determining required deployable files. Compilation terminated.
Details:
Not enough input arguments.
also this command with more specified options has the same result
mcc -m -W main -T link:exe MyNewApp.m

Iniciar sesión para comentar.

Respuestas (1)

Ajay Neeli
Ajay Neeli el 5 de En. de 2021
The issue is most likely associated with licensing. This error might have resulted in case Simulink license is not available, but Simulink Compiler license is available. The license administrator might have excluded the Simulink product from license account. You may ask your license administrator to do the same for Simulink_Compiler using exclusion list.
After disabling the following command will return 0 whereas earlier when enabled it returns 1.
>> license('test','Simulink_Compiler')
You can find your license administrator by following the steps here:

Categorías

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

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by