Mex Visual Studio C/C++ compiler

62 views (last 30 days)
Ethel Marquer
Ethel Marquer on 9 Jan 2020
Answered: Chidvi Modala on 21 Jan 2020
Hello,
Matlab doesn't find an installed compiler even though microsoft compiler file cl.exe exists in:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64
When I am running the command:
mex -setup -v
I get this output:
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\WDExpress\').
... Executing command 'set "vcroot=C:\Program Files (x86)\Microsoft Visual Studio\2017\WDExpress"&for /f "delims= " %a in ('type "C:\Program Files (x86)\Microsoft Visual Studio\2017\WDExpress\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do @if exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\WDExpress\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe" call echo %vcroot%' ...No.
Did not find installed compiler 'Microsoft Visual C++ 2017 (C)'.
Since visual Studio Express is not installed on my computer, I don't understand why "set vcroot" points to
C:\Program Files (x86)\Microsoft Visual Studio\2017\WDExpress
I think it should be
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional
instead
Thanks,

Answers (1)

Chidvi Modala
Chidvi Modala on 21 Jan 2020
You can find answer to a similar question here

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!