Does MATLAB R2015b support Microsoft Visual C++ 2015 Professional for mex compilation?
12 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Rahul Goel
2016-1-6
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.
更多回答(2 个)
Shaun Cummins
2016-3-7
编辑:Walter Roberson
2016-3-7
1 个评论
Jakob Nikolas Kather
2016-12-19
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
2016-3-7
编辑:SG
2016-3-7
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 C Shared Library Integration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!