Can I use Microsoft Visual Studio 2019 with MATLAB R2019a or R2018b?
이전 댓글 표시
Can I use Microsoft Visual Studio 2019 with MATLAB R2019a or R2018b?
채택된 답변
추가 답변 (2개)
Onur Bektas
2019년 8월 8일
8 개 추천
With Matlab 2019a Update 3 Visual Studio 2019 is officially supported.
댓글 수: 1
Tom Grieve
2019년 12월 9일
This really ought to become the accepted answer.
Royi Avital
2019년 5월 25일
편집: Royi Avital
2019년 5월 25일
2 개 추천
I'm not sure how the search for Compiler works for the mex command.
From 5 minutes research I did I came to the conclusion it works as following:
- It goes through each xml file in C:\Program Files\MATLAB\R2018b\bin\win64\mexopts.
- Each xml file define places to look and priority (In case you have more than 1).
- The search goes by priority and set the compiler it finds with the highest priority among all those found.
Once it finds a compiler it creates an xml file named C:\Users\<UserName>\AppData\Roaming\MathWorks\MATLAB\R2018b\mex_C_win64.xml.
Now, in MATLAB R2018b and probably R2019a you have files searching for VS 2017 but not for 2019.
I took msvc2017.xml and msvcpp2017.xml renamed them to msvc2019.xml and msvcpp2019.xml. I edited their content for what I think would be right for Visual Studio 2019. Basically updating version number from 15.0 to 16.0.
I attached a zip file witho those to the answer.
I think if you copy them into C:\Program Files\MATLAB\R2018b\bin\win64\mexopts\ and run mex -v -setup it should work.
댓글 수: 4
Rody Oldenhuis
2019년 5월 30일
On R2019a, there's still no official support. This solution -almost- worked; I had to add a REG_SZ to the registry at:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7
with content:
Name: 16.0
Value: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\
After that, everything worked like a breeze.
Royi Avital
2019년 8월 8일
I thought that would be something added by VS 2019 setup. What key does VS 2019 add?
Jie Xie
2020년 8월 19일
How to deal with Visual Studio Community version 2019
Walter Roberson
2020년 8월 19일
Jie Xie, which release are you using?
카테고리
도움말 센터 및 File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!