Does MATLAB R2015b support Microsoft Visual C++ 2015 Professional for mex compilation?
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Shaun Cummins
le 4 Jan 2016
Commenté : Celil Semih Sevincik
le 4 Jan 2022
On a Windows 10 Pro 64-bit platform, I've installed Microsoft Visual Studio 2015 and then upgraded MATLAB to R2015b since this is a valid combination according to "http://www.mathworks.com/support/compilers/R2015b/win64.html".
When running "mex -setup -v", MATLAB R2015b cannot find a compiler and throws the error "No supported compiler or SDK was found."
A closer look at the command windows reveals that MATLAB did find the following registry setting: "Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 14.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 14.0\')"
However, MATLAB then looks for "cl.exe" and this cannot be found: "... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.exe' ...No".
I've searched for the file "cl.exe" on my PC and I cannot find it anywhere.
My Microsoft Visual Studio installation reports:
Microsoft Visual Studio Professional 2015 Version 14.0.24720.00 Update 1
Microsoft .NET Framework Version 4.6.01038
Installed Version: Professional
Visual Basic 2015 XXXXX-XXXXX-03552-AA263 Microsoft Visual Basic 2015
Visual C# 2015 XXXXX-XXXXX-03552-AA263 Microsoft Visual C# 2015
Visual C++ 2015 XXXXX-XXXXX-03552-AA263 Microsoft Visual C++ 2015
Is this the correct tool?
Many thanks
Shaun Cummins
0 commentaires
Réponse acceptée
Rahul Goel
le 6 Jan 2016
Hi Shaun,
As per the link below, MATLAB R2015b does support Visual Studio 2015 Professional Edition for compilation purposes: http://www.mathworks.com/support/compilers/R2015b/index.html
Try uninstalling and re-installing the Visual Studio to see if it helps.
Plus de réponses (2)
Shaun Cummins
le 7 Mar 2016
Modifié(e) : Walter Roberson
le 7 Mar 2016
1 commentaire
Jakob Nikolas Kather
le 19 Déc 2016
Thank you very much. I spent two days looking for a problem with my "Microsoft Visual Studio 2015 Professional" installation and my "Matlab R2016b" installation until I read you post...
SG
le 7 Mar 2016
Modifié(e) : SG
le 7 Mar 2016
In order to solve this issue you need to create symbolic links to the correct locations.
If you are using Windows 7(64) the correct path for 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.exe' in VS 2015 is 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\cl.exe'. You can make a symbolic link to a folder like this in command line (admin mode):
mklink /D C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64 C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64
You will also need to create another symbolic link to 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe'.
You can get MATLAB to recognise Visual Studio Express (VSE) 2015 as Visual Studio Professional (VSP) by creating a symbolic link.
In VSE 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe' does not exist. VSE uses WDExpress.exe as devenv.exe. You will need to to create a symbolic link in command line (admin mode):
mklink /D C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\WDExpress.exe
PS: When you are working with MATLAB mex, make sure you enable verbose mode by adding -v to the end of your setup command. Look at the output and see what is that mex looking for and where. Find the right locations and make symbolic links to them.
1 commentaire
Voir également
Catégories
En savoir plus sur C Shared Library Integration 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!