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!