Mex won't recognize Microsoft Visual C++ Compilers
75 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hey all, I'm trying to configure my Labjack to work with my MATLAB for a project and I can't see to get the two to sync up. I've downloaded the Labjack drivers from the Labjack site, ensured that I have Microsoft Visual C++ 2015 installed which is in the list of supported compilers for MATLAB, but whenever I run the mex -setup command, I get the error: "No supported compiler or SDK was found. For options, visit http://www.mathworks.com/support/compilers/R2015a/win64.html."
I've looked at other questions for this, and none of the answers have helped me. The problem seems to be that I can't get mex to recognize my compilers which are clearly installed on my computer. Any help would be amazing, I can't seem to figure this out.
3 commentaires
Helen Zhu
le 12 Juin 2024
Microsoft Visual C++ 2015 is not supported for R2015a MATLAB. See SystemRequirements-Release2015a_SupportedCompilers.pdf (mathworks.com)
Réponses (8)
Matthew Edwards
le 2 Mai 2017
I ran into this same issue; Visual Studio 2015 does not install C++ by default. "You have to rerun the setup, select Modify and then check Programming Language -> C++"
Dror Lederman
le 27 Mar 2016
Hi, Having the same issue with Matlab 2015b and studio prof. 2015, on Win 8.1
mex -setup -v
Verbose mode is on.
... Looking for compiler 'Intel C++ Composer XE 2011 with Microsoft SDK 7.1 (C)' ...
... Looking for environment variable 'ICPP_COMPILER12' ...No.
Did not find installed compiler 'Intel C++ Composer XE 2011 with Microsoft SDK 7.1 (C)'.
... Looking for compiler 'Intel C++ Composer XE 2011 with Microsoft Visual Studio 2008 (C)' ...
... Looking for environment variable 'ICPP_COMPILER12' ...No.
Did not find installed compiler 'Intel C++ Composer XE 2011 with Microsoft Visual Studio 2008 (C)'.
... Looking for compiler 'Intel C++ Composer XE 2011 with Microsoft Visual Studio 2010 (C)' ...
... Looking for environment variable 'ICPP_COMPILER12' ...No.
Did not find installed compiler 'Intel C++ Composer XE 2011 with Microsoft Visual Studio 2010 (C)'.
... Looking for compiler 'Intel C++ Composer XE 2013 with Microsoft SDK 7.1' ...
... Looking for environment variable 'ICPP_COMPILER14' ...No.
... Looking for environment variable 'ICPP_COMPILER13' ...No.
Did not find installed compiler 'Intel C++ Composer XE 2013 with Microsoft SDK 7.1'.
... Looking for compiler 'Intel C++ Composer XE 2013 with Microsoft Visual Studio 2010 (C)' ...
... Looking for environment variable 'ICPP_COMPILER14' ...No.
... Looking for environment variable 'ICPP_COMPILER13' ...No.
Did not find installed compiler 'Intel C++ Composer XE 2013 with Microsoft Visual Studio 2010 (C)'.
... Looking for compiler 'Intel C++ Composer XE 2013 with Microsoft Visual Studio 2012 (C)' ...
... Looking for environment variable 'ICPP_COMPILER14' ...No.
... Looking for environment variable 'ICPP_COMPILER13' ...No.
Did not find installed compiler 'Intel C++ Composer XE 2013 with Microsoft Visual Studio 2012 (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++ 2008 (C)' ...
... Looking for environment variable 'VS90COMNTOOLS' ...No.
Did not find installed compiler 'Microsoft Visual C++ 2008 (C)'.
... Looking for compiler 'Microsoft Visual C++ 2010 (C)' ...
... Looking for environment variable 'VS100COMNTOOLS' ...No.
Did not find installed compiler 'Microsoft Visual C++ 2010 (C)'.
... Looking for compiler 'Microsoft Visual C++ 2012 (C)' ...
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 11.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 11.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 11.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 11.0 ...No.
Did not find installed compiler 'Microsoft Visual C++ 2012 (C)'.
... Looking for compiler 'Microsoft Visual C++ 2013 Professional (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 Professional (C)'.
... 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)'.
... Looking for compiler 'Microsoft Windows SDK 7.1 (C)' ...
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1' InstallationFolder ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v7.1' InstallationFolder ...No.
Did not find installed compiler 'Microsoft Windows SDK 7.1 (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, see http://www.mathworks.com/support/compilers/R2015b/win64.html.
0 commentaires
Steven Hoffman
le 13 Sep 2017
If anyone has trouble with Matlab 2016b or 2017a recognizing the Visual Studio 2017 compiler, this seems to be a bug. MathWorks has provided a work around though that you can download. See this bug report: MathWorks Bug Report
2 commentaires
Walter Roberson
le 24 Sep 2017
Not technically a "bug" as such: VS 2017 was released in 2017, after R2016b had been in existence nearly 6 months. VS 2017 was released on March 6, 2017, just three days before MATLAB R2017a, which was far too late for MATLAB R2017a to have support for it built in. The items linked to are patches for R2016b and R2017a to support VS 2017 essentially retroactively.
Peter Cook
le 20 Juin 2019
Is there a similar patch in place for Visual Studio 2019, or should I edit the mex_C_win64.xml & mex_C++_win64.xml files manually?
Youssef Elshebani
le 23 Juin 2022
I still have the same issue in 2021b release of matlab not recognizing the compiler even though its installed
0 commentaires
Walter Roberson
le 4 Mar 2016
Which operating system are you using? If you are using Windows 10, then MATLAB R2015a is not supported on Windows 10, and in particular you would have a difficult time getting a working compiler for it.
2 commentaires
Walter Roberson
le 4 Mar 2016
Modifié(e) : Walter Roberson
le 4 Mar 2016
And neither of you have indicated which operating system you are using.
Is your Visual C++ 2015 the Professional version or the Express version? Only the Professional version is supported.
Mauro Graça
le 12 Juin 2019
cl.exe is not found. Just Install C++ tools from visual studio installer
0 commentaires
Helen Zhu
le 12 Juin 2024
Microsoft Visual C++ 2015 is not supported for R2015a MATLAB. See SystemRequirements-Release2015a_SupportedCompilers.pdf (mathworks.com)
0 commentaires
Voir également
Catégories
En savoir plus sur MATLAB Support for MinGW-w64 C/C++ Compiler dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!