Why does MATLAB Compiler generate a warning message about a startup file, even though no startup file is present on the MATLAB search path?
10 views (last 30 days)
Show older comments
MathWorks Support Team
on 26 Oct 2017
Edited: MathWorks Support Team
on 31 Aug 2024
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
Accepted Answer
MathWorks Support Team
on 20 Feb 2024
Edited: MathWorks Support Team
on 31 Aug 2024
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 Comments
More Answers (0)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!