一直没法在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 加上你要编译的文件)