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?

 Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 21 Jan 2026
Modifié(e) : MathWorks Support Team le 21 Jan 2026
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? 

Plus de réponses (0)

Catégories

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

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

Start Hunting!

Translated by