MATLAB Answers

How to run a standalone executable compiled in older version FROM console

1 ビュー (過去 30 日間)
Pim Hacking
Pim Hacking 2020 年 1 月 24 日
回答済み: Andrew Janke 2020 年 1 月 31 日
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).
Any tips?

  0 件のコメント

サインイン to comment.

採用された回答

Andrew Janke
Andrew Janke 2020 年 1 月 31 日
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.

  0 件のコメント

サインイン to comment.

その他の回答 (0 件)

サインイン してこの質問に回答します。


Translated by