MATLAB Answers

Why is MATLAB unable to find the Microsoft Visual C++ 2015 compiler after installing Microsoft Visual Studio 2015 Professional?

조회 수: 401(최근 30일)
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
편집: MathWorks Support Team 9 Mar 2017
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".

추가 답변(1개)

Roman Dolmatovich
Roman Dolmatovich 2 Jun 2019
I have Matlab 2018b and Microsoft visual studio community 2019 (russian) with components:
Cmplr.png
Same problem.
>> mex -v -setup
Verbose mode is on.
Did not find installed compiler 'Intel Parallel Studio XE 2015 with Microsoft Visual Studio 2015 (C)'.
Did not find installed compiler 'Intel Parallel Studio XE 2016 with Microsoft Visual Studio 2015 (C)'.
Did not find installed compiler 'Intel Parallel Studio XE 2017 with Microsoft Visual Studio 2015 (C)'.
Did not find installed compiler 'Intel Parallel Studio XE 2017 with Microsoft Visual Studio 2017 (C)'.
Did not find installed compiler 'Intel Parallel Studio XE 2018 with Microsoft Visual Studio 2015 (C)'.
Did not find installed compiler 'Intel Parallel Studio XE 2018 with Microsoft Visual Studio 2017 (C)'.
Found installed compiler 'MinGW64 Compiler (C)'.
Did not find installed compiler 'Microsoft Visual C++ 2013 (C)'.
Did not find installed compiler 'Microsoft Visual C++ 2015 (C)'.
Did not find installed compiler 'Microsoft Visual C++ 2017 (C)'.
Which component to add? Answer details

  댓글 수: 0

로그인 to comment.

이 질문에 답변하려면 로그인을(를) 수행하십시오.

제품


릴리스

R2016a

Translated by