Microsoft Visual Studio 2017 is not detected in Matlab 2018b

12 ビュー (過去 30 日間)
amin ya
amin ya 2018 年 10 月 13 日
回答済み: shubham kumar gupta 2021 年 2 月 4 日
I have installed Microsoft Visual Studio 2017 community, but when I run:
mex -setup
I get this error:
Error using mex
No supported compiler was found. You can install the freely available MinGW-w64 C/C++
compiler; see Install MinGW-w64 Compiler. For more options, visit
https://www.mathworks.com/support/compilers.
I installed Microsoft Visual Studio in another drive (not C) on Windows 8.1. I have attached the screenshot of Visual Studio components that I have installed.
>> mex -v -setup
Verbose mode is on.
... Looking for compiler 'Intel Parallel Studio XE 2015 with Microsoft Visual Studio 2015 (C)' ...
... Looking for environment variable 'ICPP_COMPILER15' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2015 with Microsoft Visual Studio 2015 (C)'.
... Looking for compiler 'Intel Parallel Studio XE 2016 with Microsoft Visual Studio 2015 (C)' ...
... Looking for environment variable 'ICPP_COMPILER16' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2016 with Microsoft Visual Studio 2015 (C)'.
... Looking for compiler 'Intel Parallel Studio XE 2017 with Microsoft Visual Studio 2015 (C)' ...
... Looking for environment variable 'ICPP_COMPILER17' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2017 with Microsoft Visual Studio 2015 (C)'.
... Looking for compiler 'Intel Parallel Studio XE 2017 with Microsoft Visual Studio 2017 (C)' ...
... Looking for environment variable 'ICPP_COMPILER17' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2017 with Microsoft Visual Studio 2017 (C)'.
... Looking for compiler 'Intel Parallel Studio XE 2018 with Microsoft Visual Studio 2015 (C)' ...
... Looking for environment variable 'ICPP_COMPILER18' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2018 with Microsoft Visual Studio 2015 (C)'.
... Looking for compiler 'Intel Parallel Studio XE 2018 with Microsoft Visual Studio 2017 (C)' ...
... Looking for environment variable 'ICPP_COMPILER18' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2018 with Microsoft Visual Studio 2017 (C)'.
... Looking for compiler 'MinGW64 Compiler (C)' ...
... Looking for environment variable 'MW_MINGW64_LOC' ...No.
Did not find installed compiler 'MinGW64 Compiler (C)'.
... Looking for compiler 'Microsoft Visual C++ 2013 (C)' ...
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
Did not find installed compiler 'Microsoft Visual C++ 2013 (C)'.
... Looking for compiler 'Microsoft Visual C++ 2015 (C)' ...
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VC7' 14.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VC7' 14.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7' 14.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7' 14.0 ...No.
Did not find installed compiler 'Microsoft Visual C++ 2015 (C)'.
... 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 ('D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\').
... Executing command 'set "vcroot=D:\Program Files (x86)\Microsoft Visual Studio\2017\Community"&for /f "delims= " %a in ('type "D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do @if exist "D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe" call echo %vcroot%' ...Yes ('D:\Program Files (x86)\Microsoft Visual Studio\2017\Community').
... 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)'.
... Looking for compiler 'MinGW64 Compiler (C)' ...
... Looking for environment variable 'MW_MINGW64_LOC' ...No.
Did not find installed compiler 'MinGW64 Compiler (C)'.
Error using mex
No supported compiler was found. You can install the freely available MinGW-w64 C/C++
compiler; see Install MinGW-w64 Compiler. For more options, visit
https://www.mathworks.com/support/compilers.
  6 件のコメント
Image Analyst
Image Analyst 2019 年 5 月 2 日
Just call them for the fastest help. The compiler is one of the most expensive toolboxes they sell, if not THE most. They will certainly do all you deserve to help you. It's no additional cost beyond what you've already paid.
amin ya
amin ya 2019 年 5 月 2 日
@Andy Dun: I decided to use another compiler at that time. But again I am going to test with new version of Visual Studio. I will let you know if I could make it work

サインインしてコメントする。

回答 (2 件)

Image Analyst
Image Analyst 2018 年 10 月 13 日
編集済み: Image Analyst 2018 年 10 月 13 日
Are you sure you installed the C package, and not just some other packages like VB or something? If so, then call the Mathworks and ask them. I had the same problem (only VB) and it couldn't find a compiler until I modified the installation to add C.
  1 件のコメント
amin ya
amin ya 2018 年 10 月 14 日
I guess so! See the image I have attached. I modified the installation a little, but I left things which I thought was needed.

サインインしてコメントする。


shubham kumar gupta
shubham kumar gupta 2021 年 2 月 4 日

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by