How do I install Visual Studio for use with MATLAB/Simulink?

How do I install Microsoft® Visual Studio® as a C/C++ compiler for MATLAB/Simulink on Windows?

 채택된 답변

MathWorks Support Team
MathWorks Support Team 2026년 1월 21일
편집: MathWorks Support Team 2026년 1월 21일

15 개 추천

Make sure that you install the correct version of Visual Studio that is compatible with your MATLAB release:
Visual Studio Version
Supported MATLAB Version
R2021b Update 3 and later
R2019a and later
R2016b and later
R2023b and later
R2023b and later
* Community, Professional, and Enterprise editions are supported. Express, Preview, and Code editions are not supported.
Reach out to your IT department or system administrator for assistance with downloading, installing, and licensing Visual Studio.
To use Visual Studio as a compiler with MATLAB/Simulink, make sure that the "Desktop development with C++" workload is selected during the installation, as shown in the screenshot below. This will make sure that the actual Visual Studio C++ (MSVC) compiler and all necessary dependencies are installed on your system.
To verify if this workload is installed for your existing installation, open Visual Studio IDE and go to Tools > Get Tools and Features, which opens the Visual Studio Installer.
Notes:
1) To use Visual Studio 2017 with Simulink Real-Time in MATLAB R2020a and earlier, refer to the following MATLAB Answer: How do I set up Microsoft Visual Studio 2017 for SLRT? 
2) Support for Visual Studio 2017 can be added to MATLAB R2017a or MATLAB R2016b through a patch. See: Can I use Microsoft Visual Studio 2017 with MATLAB R2017a or R2016b? 

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by