I'm using MATLAB's deployment tool to compile a simple project which uses a mex library. The executable runs OK and does what it's supposed to do except that when it's supposed to finish, nothing happens. It just sits there.
When I'm compiling any other project, for instance the magic square example from the docs, it works OK. The executable finishes and exits.
I added a disp('at end');
at the end of the .m file, and this line is indeed getting displayed so I know it got to the end of the .m file but it just doesn't exit the process.
Why does this happen?
Edit:
In MATLAB it runs normally, returning after the 'at end'
. The code is way too long to include here. It does fairly normal stuff, other than using the mex library.