add files & folders to 2025A compiler task manager
23 views (last 30 days)
Show older comments
Hello,
Since I've upgrated matlab to 2025A, I am struggling each time to compile a quite complex software.
1) The first mess is that my source code is located in different folders. I have to create a .prj file literally at the disk level (C://) is order to include all source code in my project (compiler task manager can only read children folders).
2) Despite setting my project at the disk level, I always get errors trying to add folders & files manually. I do it because the dependency analyzer cannot find some source code dependency which is under the "eval" function.

The folder I am trying to add to "Files Required for Standalone to Run" is a children of the project folder, and I am still getting this error with no information. Same when adding a file/multiple files.
Any help will be welcome.
Thank you very much,
Arthur
0 Comments
Accepted Answer
Image Analyst
on 13 Aug 2025
Having source code in different folders is no problem for compiling if your main program in the development environment can run and access them all. This means that they are on the search path and the mcc command will find any needed m-files that it needs. However if you're using the eval() function, you should probably not need to do that. See the FAQ:
I've written and compiled literally hundreds of complex programs in MATLAB and never ever have I had to use eval. It can very likely be recoded so that you don't need it and then all your dependent source code files would be found. Source code m-files that are in strings, like strings passed to eval, will not be detected by the dependency analyzer since it does not look inside strings for m-files and assume they might be run by a function such as eval() or system() or winopen().
If you have non source code files, then you can use a setup/installation builder software package like Centurion Setup to ship your other files (workbooks, images, sample data, text files, etc.). This is what I do. If you don't do that then you have to include all the non-m files that you want to be accessible by your program with the -a option of mcc. I don't use deploytool, I just manually write scripts called compile.m that do all the options and filenames and manually make up the mcc command. Let me know if you need a sample. If deploytool builds up an mcc command and you added additional files, then you should see them listed after the -a options (one file per dash a).
For additional help, see and understand the FAQ: https://matlab.fandom.com/wiki/FAQ#Why_can't_my_standalone_compiled_executable_find_my_files?
0 Comments
More Answers (1)
See Also
Categories
Find more on MATLAB Compiler 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!