Why am I not able to execute my standalone application from MATLAB environment

2 次查看(过去 30 天)
Hi,
I am trying to run a compiled standalone application using MCR 9.5 on my computer from the command line in MATLAB. The application runs perfectly outside of MATLAB; however, when trying to run it from the command line using 'system(executable)', I get the following error:
Undefined function or variable 'matlabrc'.
Undefined function or variable 'ctfroot'.
Error in checkRequiredMCRProducts (line 22)
Undefined function or variable 'ctfroot'. Opening log file:
The strange thing is that the code and everything worked perfectly until a forced restart of MATLAB. I have tried deleting the mcrCache9.5 folder from AppData, but this did not resolve the issue.
Any ideas how I could fix the problem and run the executable from the command window?
The code I use to start the application is the following:
code_source = 'compiled';
release_number = '1.46-2'; % only works for compiled code.
release_dir = 'pwd';
executable = [release_dir,'\APP',release_number,'.exe '];
system(executable)

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by