matlab 手动安装GCC

一直没法在matlab页面上面安装,只好找手动的安装方法,在matlab资源网上的评论区看到的,希望对大家有用,欢迎点赞。

How to Install TDM-GCC Compiler (step-by-step)

Note: I have MATLAB R2017a

Step 1:
Visit the following link and install the latest version of the TDM-GCC Compiler (in my case the latest version available, as of 16/07/2020, was: TDM-GCC 9.2.0 release):
去下面的连接下载GCC软件
Link: https://jmeubank.github.io/tdm-gcc

The default installation location will be: C:\TDM-GCC-64

Step 2:
In MATLAB command prompt, type and run:
在matlab命令行输入
setenv(‘MW_MINGW64_LOC’,‘C:\TDM-GCC-64’)

Step 3:
In MATLAB command prompt, type and run:
在matlab命令行输入开始安装
mex -setup

然后就可以开心使用了,比如 mex rir_generator.cpp (mex 加上你要编译的文件)

cite from:https://ww2.mathworks.cn/matlabcentral/fileexchange/52848-matlab-support-for-mingw-w64-c-c-compiler?s_tid=mwa_osa_a

猜你喜欢

转载自blog.csdn.net/weixin_39987672/article/details/109222456