How to run a standalone executable compiled in older version FROM console
3 views (last 30 days)
I have a standalone executable that was compiled in MCR 9.1 (I do not have the original files)
I need to run that standalone executable from a script in matlab R2018b (MCR 9.5).
I have installed MCR 9.1.
Running the executable on its own works fine. However, when I try to run it from Matlab it complains about not being able to find MCR 9.1
I also tried calling a bat file from Matlab, but it still complains (running the bat file by itself works like a charm).
Andrew Janke on 31 Jan 2020
Check the state of the %PATH% environment variable from within Matlab. Matlab adds its own libs to the PATH, and those libs overlap what is in the MCR, so when you're running a compiled-Matlab command via system() from within Matlab 9.5, you're running it against MCR 9.5, even if you have MCR 9.1 installed separately on your computer. You will probably have to make a little batch file that re-adds the MCR 9.1 lib paths to the front of your %PATH% variable, and call your standalone app through that bat file.