MATLAB Answers

Matlab Compiler error during converting Mat files into exe

조회 수: 6(최근 30일)
Satyendra Tiwari
Satyendra Tiwari 2020년 11월 27일
답변: Ajay Neeli 2021년 1월 5일
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
Satyendra Tiwari
Satyendra Tiwari 2020년 11월 27일
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

댓글을 달려면 로그인하십시오.

답변(1개)

Ajay Neeli
Ajay Neeli 2021년 1월 5일
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:

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by