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

5 visualizzazioni (ultimi 30 giorni)
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...

Risposte (0)

Categorie

Scopri di più su MATLAB Compiler in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by