how to include multiple external .exe programs into your compiled matlab exe program
Show older comments
Hello,
I am trying to create a stand-alone program, which calls several executables within the code. My program works perfectly fine under matlab, but once i move the program to another computer with a different file-structure, it cannot find the additional exe-files any more. So far my work-around is replicating the same folder-structure. Is there any way to include the exe-files in my matlab-executable?
Example:
main_prog:
prog_root = 'C:\folder_with_executables\';
prog1 = strcat(prog_root ,'prog1');
prog2 = strcat(prog_root ,'prog2');
cmd = sprintf('%s', prog1);
system(cmd)
cmd = sprintf('%', prog2);
system(cmd)
my usual compilation of choice is then:
mcc -m main_prog.m -o main_prog
That works all fine as long as the prog_root-folder with the exe-files exists. Otherwise an error occurs and it cannot find the prog1 and prog2 exe-files. Is there away to include it within the main_prog? (same as the normal additional matlab-files are included). What are the flags to set for compilation? Would appreciate any help.
Answers (0)
Categories
Find more on Get Started with MATLAB 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!