MATLAB Answers

0

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

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?
 

Products


Release

R2016a

2 Answers

Answer by MathWorks Support Team on 9 Mar 2017
Edited by MathWorks Support Team on 9 Mar 2017
 Accepted Answer

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".

Answer by Roman Dolmatovich on 2 Jun 2019 at 6:18

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 Comments

Sign in to comment.