Standalone Application giving warnings on exit()

2 views (last 30 days)
rek
rek on 21 Aug 2019
Edited: rek on 22 Aug 2019
I have a top-level .m function that calls a large number of functions and classes compiled into a standalone application, using compiler version: 6.1 (R2015b). The application runs properly, but in order to integrate it with other software, I need to provide an output code to the command interpreter: the same value that would normally be the output of the uncompiled function:
function exitcode = sequence()
From what I understand, the only way of doing this is by using the exit(x) command.
When I call the exit command (line 278-280):
if isdeployed
exit(exitcode)
end
I get the following warning:
'''
Warning: The file 'C:\Users\xxxx\AppData\Local\Temp\xxxx\mcrCache9.0\TestSoftware\sequence.m' could not be cleared because it contains MATLAB code that is currently executing.
> In sequence.m (line 279)
'''
Every answer I found regarding this warning is "don't use clear all", but I'm not, it seems to be integrated into the exit() command. What can I do to figure out what's producing the warning, and to stop the "MATLAB code that is currently executing"?
Tried the same code on Matlab 2014b, and the warnings don't pop up.

Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products


Release

R2015b

Community Treasure Hunt

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

Start Hunting!