Why is MATLAB unable to find the Microsoft Visual C++ 2015 compiler after installing Microsoft Visual Studio 2015 Professional?
조회 수: 47 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2017년 3월 6일
편집: MathWorks Support Team
2017년 3월 9일
I installed Microsoft Visual Studio 2015 Professional, however "mex -setup" still does not successfully find the Microsoft Visual C++ 2015 compiler. This can be seen from the following output snippet of running the command "mex -v -setup":
... Looking for compiler 'Microsoft Visual C++ 2015 Professional (C)' ...
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 14.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 14.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 14.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 14.0\').
... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.exe' ...No.
Did not find installed compiler 'Microsoft Visual C++ 2015 Professional (C)'.
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/R2016a/win64.html.
Why is this occurring?
채택된 답변
MathWorks Support Team
2017년 3월 9일
편집: MathWorks Support Team
2017년 3월 9일
What we see in the output above is that indeed Microsoft Visual Studio 2015 has been installed, but the actual C/C++ compiler is missing. This is likely caused by having installed Microsoft Visual Studio 2015 Professional using the "Typical" setup option which will not install the Visual C/C++ compiler by default. This is seen in Microsoft's documentation:
To resolve this issue, re-run the Visual Studio 2015 installer again and choose to perform a "Custom" setup. Then during installation, make sure to enable "Visual C++" under "Programming Languages".
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!