R2021b need at least
MinGW 6.3
orMSBuild 2017
.
https://ww2.mathworks.cn/en/support/requirements/supported-compilers.html
For rich people, just use the latest version ofMSBuild
.
- Download
MinGW
formhttps://sourceforge.net/projects/mingw-w64/files/
- For windows, choose
win32
, for exception,seh
is better(butx86
is not supported), sox86_64-win32-seh
is selected. - Setup
MW_MINGW64_LOC
environment variable(root ofMINGW
):
ByPowershell
:
[environment]::SetEnvironmentvariable("MW_MINGW64_LOC","MinGW-WPath","Machine")
[environment]::GetEnvironmentvariable("MW_MINGW64_LOC","Machine")
or Command prompt
:
setx /m MW_MINGW64_LOC "MinGW-WPath"
set MW_MINGW64_LOC
- Run
mex -setup c -v
in verbose mode.