How to run compiled MATLAB executable without MATLAB installed?
조회 수: 66 (최근 30일)
이전 댓글 표시
I use mcc -m main.m to create an exe file. When I run it on another computer that does not have Matlab installed, I get this error
Could not find version 24.1 of the MATLAB Runtime. Attempting to load mclmcrrt24_1.dll. Please install the correct version of the MATLAB Runtime. Contact your vendor if you do not have an installer for the MATLAB Runtime.
I asked GPT, and it suggested I use mcc -m main.m -R -logfile But it doesn't work.
I have developed an image-processing algorithm using MATLAB and created an interface in C#. However, the MATLAB runtime is quite large, so I’d prefer not to require users to install MATLAB or the MATLAB runtime when I release the interface.
I want the executable file to run on computers that do not have MATLAB or the MATLAB runtime installed. Is there any solution for this? How can I achieve that?
댓글 수: 0
답변 (1개)
dpb
2024년 10월 22일 21:53
"....the MATLAB runtime is quite large, so I’d prefer not to require users to install MATLAB or the MATLAB runtime when I release the interface."
Well, "If a frog had wings..." comes to mind.
If you want to run the compiled .exe on other machines, they will have to have the runtime installed whether you would prefer that or not.
It is a sizable download, that is true, and it would agoodthing™ if Mathworks would make the build more intelligent so only the actual pieces the app needs are downloaded instead of the whole thing, but so far that option isn't available.
You can deploy in one of two ways, either bind the runtime in with the executable, increasing its size, or have the runtime download/install the first time the app is installed on the machine. I'd suggest the latter, but it's either, or, your choice, but there is no third choice of "make the app create the runtime code for itself".
댓글 수: 4
dpb
2024년 10월 23일 0:21
Thanks for that update, Walter. For primarily having to deal with an IT group to update anything with the apps I've built for the local college foundation, I've stuck with R2022b in order to not have to update the runtime. If it could be shrunk considerably, that might be worthwhile although it probably doesn't do anything to help with the semmingly interminable startup time of the compiled apps, does it?
Bruno Luong
2024년 10월 23일 8:56
편집: Bruno Luong
2024년 10월 23일 9:45
I just play a liitle bit with minimal MCR new R2024 feature mentioned by Walter.
In the magicsquare example, the minimal installer is 2.02 Gb vs 7.3 for the full version.
It takes 10s to open exe the first time. So somewhat it helps but not spectacular.
Not sure where the minima MCR is installed. It not appears in Control Panel Programs and Features in Windows system. If someone knows please let me know. NOTE that I install-uninstall the full MCR some time later.
참고 항목
카테고리
Help Center 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!