Why does MATLAB Compiler generate a warning message about a startup file, even though no startup file is present on the MATLAB search path?

I am trying to create a standalone application using Application Compiler or 'mcc' and get the Warning message:
[Warning: Your deployed application may error out because file or folder paths not present in the deployed environment may be included in your MATLAB startup file. Use the MATLAB function "isdeployed" in your MATLAB startup file to determine the appropriate execution environment when including file and folder paths, and recompile your application. ]
I confirmed that there is no startup.m file present on the MATLAB search path.
>> which startup.m 'startup.m' not found
The mcc equivalent code that I use to invoke MATLAB Compiler is:
>> mcc -m myprogram.m -a ./*.mexw64

 채택된 답변

MathWorks Support Team
MathWorks Support Team 2024년 2월 20일
편집: MathWorks Support Team 2024년 8월 31일
When you use the "-a" flag to include additional files in your compilation, the MATLAB Compiler (mcc) checks the specified directory for any files, including a potential "startup.m". If "startup.m" exists in the directory of the files you're including, MATLAB Compiler will issue the above warning as a caution that the startup.m file will be included in the compiled package, which might cause issues in the deployed environment.
To resolve this, ensure that no "startup.m" file is present in the directories of the files you are including with the "-a" flag. If a "startup.m" file is indeed present and is not intended to be part of your compiled application, you should move it to a different location or rename it to prevent its inclusion.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by