一、前言
之前为了在matlab中使用Embeded Coder功能,需要安装matlab支持的C 编译器。matlab 安装MingW64编译器很复杂,不得已就安装了VS2019,现在发现了一种官方提供的离线安装MingW64的方法,这样就不用安装VS2019这个庞然大物了。
二、安装方法
(1)在线单独下载
附加功能——>获取附加功能
搜索mingw64
点击安装——>仅下载 其原因是如果选择了“安装”,大概率会安装不上,因此就仅下载。单独下载是很快的。
MingW64下载之后的位置
(2)离线安装
这里已经有了下载好的安装包
首先查看下载文件里面的readme.txt,这个文件很有用,说明了安装的方法
2. Interactive Installation
---------------------------
The interactive installer will start MATLAB and then the installer in a separate window. The
executable takes a single argument; the path to the location of the previously downloaded
files. All available support packages in the specified download folder are presented.
In a command prompt, type the following:
a. Windows
cd DRIVE:\<MATLAB_PATH>\bin\win64
install_supportsoftware.exe -archives <path_to_download_folder> [-matlabroot DRIVE:\MATLAB_PATH]
For example:
cd C:\MATLAB\R2018b\bin\win64
install_supportsoftware.exe -archives C:\Users\jsmith\Downloads\MathWorks\SupportPackages\R2018b
用管理员身份打开CMD,针对我的路径情况,需要输入的命令是如下。
cd C:\Program Files\Polyspace\R2021a\bin\win64
install_supportsoftware.exe -archives C:\Users\ll\Downloads\MathWorks\SupportPackages\R2021a
输入命令后进入安装过程
(3)安装好后
设置编译器,之前有VS2019,现在加入了MingW64
|