MATLAB 2017a unable to detect MS Visual C++ 2017 compiler

Please help with this compiler issue in MATLAB 2017a.
I have both MATLAB 2017a & MS Visual Studio 2017 installed (see attached About screenshots)
Running mex -setup -v in MATLAB results in...
As you can see, the registry entry 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' is found and system variables are successfully set.
Ultimately, the compiler is not found.
This bug fix ... https://www.mathworks.com/support/bugreports/1487958 does nothing to fix the problem.
I am out of ideas. Might this be a compiler bit-ness problem? Please HELP!
Here is OS info...
vcpp2017_os.JPG

3 Comments

"As you can see, the registry entry 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' is found and system variables are successfully set."
I do not think so. The log text contains (what a pitty that you have posted it as a screenshot, that I cannot copy&paste it...):
Looking for registry setting '[...]' ... No
The "No" means, that these keys are not found. So I cannot see, that the entry is found.
Jan,
Here is the text of the verbose output of mex -setup -v
... Looking for compiler 'Microsoft Visual C++ 2017 (C)' ...
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 15.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 15.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 15.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\').
... Executing command 'set "vcroot=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional"&for /f "delims= " %a in ('type "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do @if exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe" call echo %vcroot%' ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional').
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0' InstallationFolder ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0' InstallationFolder ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0' InstallationFolder ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0' InstallationFolder ...No.
Did not find installed compiler 'Microsoft Visual C++ 2017 (C)'.
Ah, now we have a 'Yes', which I cannot find in the screen shot:
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 15.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\').
Did you install the 64-bit compilers? In the SDK7.1 it was required to select them manually, as far as I remember.

Sign in to comment.

Answers (1)

Jan
Jan on 22 Jan 2019
Edited: Jan on 22 Jan 2019
Look at the list of supported compilers:
The solution explained on the bugreport is not trivial: https://www.mathworks.com/support/bugreports/1487958 . So are you really sure, that this does not help in your case?

2 Comments

Jan,
The bug fix hase been applied (basically replacing 4 files... the 2 msvc*.xml files in the bin/win64/mexopts folder; and the attachment_1487958_17a_win64_2017-05-10.txt & license.txt files in the bugreport folder).
Note the the version number (%a 14.11.25503 ) is being read as expected.
The reason I mention bit-ness of the compiler is because I notice that the VIsual Studio 2017 is installed in the Program FIles (x86) which is usually install path for 32-bit apps on 64-bit OS...right?

Sign in to comment.

Categories

Asked:

on 22 Jan 2019

Commented:

Jan
on 25 Jan 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!