Console Application Error: forrtl error (200) program aborting due to window-close event

5 次查看(过去 30 天)
Hi,
I wrote a Matlab Function and generate a .dll file to use in a console application.
Although, the .dll works perfectly; whenever I try to close the console while it is waiting for a ReadKey(), I get an error which you can see below.
I even get the same error while using a .dll of a very simple function which is given in below;
% Main Function
%
% [ JsonResponsePackets ] = MainFunction( JsonRequestPackets)
% <<< Function Inputs >>>
% string JsonRequestPackets
%
% <<< Function outputs >>>
% string JsonResponsePackets
%
function MainFunction( FileAdress, JsonRequestPackets)
disp( FileAdress );
disp( JsonRequestPackets );
%%Check File If It Exists
% Check the given adress
checkAdress = char( FileAdress );
if checkAdress( ( end - 2 ):end ) == 'bin'
if exist( FileAdress, 'file' )
% Measure Total Analysis Duration : Start
startTime = datetime('now');
else
error('File adress is not valid.')
end
else
error('File format is not valid.')
end
% Measure Total Analysis Duration : End
endTime = datetime('now');
% Display
disp( [ 'Total Analysis Duration: ' num2str( seconds(endTime - startTime ) ) ' seconds.' ] )
end
I will be very happy if anyone can help me with it.
Thanks in advance...

回答(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