如何在未安装 MATLAB 的情况下运行编译后的 MATLAB 可执行文件?

问题描述 投票:0回答:1

我使用

mcc -m main.m
创建一个exe文件。 当我在另一台未安装
Matlab
的计算机上运行它时,出现此错误

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.

我问了GPT,它建议我使用

mcc -m main.m -R -logfile
但它不起作用。

我希望 exe 文件在未安装

Matlab
或 MATLAB Runtime 的计算机上运行。我怎样才能做到这一点?

matlab compiler-errors matlab-deployment matlab-compiler
1个回答
0
投票

你不能。除非您拥有 Matlab 编码器许可证并生成 C 代码,您可以从中实际编译独立的可执行文件。您可以使用当前应用程序重新分发 Matlab 运行时:https://www.mathworks.com/products/compiler/matlab-runtime.html。检查许可证以确保它们适合您的用例。

© www.soinside.com 2019 - 2024. All rights reserved.