Why is MATLAB unable to find the Microsoft Visual C++ 2015 compiler after installing Microsoft Visual Studio 2015 Professional?
64 次查看(过去 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!