Why does mex -setup fail to locate the MinGW-64 SDK that I just installed from the Add-On explorer in Matlab R2017a?

조회 수: 26(최근 30일)
Brian McCall
Brian McCall 2017년 3월 10일
댓글: Walter Roberson 2017년 3월 13일
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/.

답변(1개)

Michelle Wu
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
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!

Translated by