Why does mex -setup fail to locate the MinGW-64 SDK that I just installed from the Add-On explorer in Matlab R2017a?
17 次查看(过去 30 天)
显示 更早的评论
I just installed MinGW-64 using the Add-On explorer. I run mex -setup from the Matlab command prompt, and I get the following error message:
Error using mex No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler; see Install MinGW-w64 Compiler. For more options, visit http://www.mathworks.com/support/compilers/R2017a/.
0 个评论
回答(1 个)
Michelle Wu
2017-3-13
It is probably because the environment variable MW_MINGW64_LOC is not set correctly during installation. Usually this variable should be set with the path of the MinGW installation folder. However, on some systems where users have limited privileges, there may policies in place preventing environment variables from being set.
In order to see whether the MW_MINGW64_LOC environment variable is set, run the "mex" command in verbose mode:
mex -setup -v
The solution is to have an administrator set the variable.
Please refer to the following MATLAB Answers post for more information:
1 个评论
Walter Roberson
2017-3-13
I speculate you might have to exit MATLAB and re-enter for it to get the environment variable.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!