MATLAB Answers

Microsoft Visual Studio 2017 is not detected in Matlab 2018b

조회 수: 66(최근 30일)
amin ya
amin ya 13 Oct 2018
댓글: amin ya 2 May 2019
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

표시 이전 댓글 수: 3
Andy Dun
Andy Dun 2 May 2019
Did you fix it? Could you share the experience?
Image Analyst
Image Analyst 2 May 2019
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 2 May 2019
@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

로그인 to comment.

답변(1개)

Image Analyst
Image Analyst 13 Oct 2018
편집: Image Analyst 13 Oct 2018
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 14 Oct 2018
I guess so! See the image I have attached. I modified the installation a little, but I left things which I thought was needed.

로그인 to comment.

이 질문에 답변하려면 로그인을(를) 수행하십시오.


Translated by