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

465 views (last 30 days)
I would like to use the Visual Studio 2017 or 2019 C/C++ compiler with MATLAB/Simulink. When installing Visual Studio, there are many packages (so-called "workloads") to choose from. Which Visual Studio workloads do I need to install?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 15 Nov 2021
Edited: MathWorks Support Team on 15 Nov 2021
Before you proceed, double-check which Visual Studio version is supported with your MATLAB release . Note that:
  • Visual Studio 2017 family has been supported since R2016b
  • Visual Studio 2019 family has been supported since R2019a
  • Community (free), Professional, and Enterprise editions are supported
  • Express, Build Tools and Preview editions are NOT supported
You can download Visual Studio here:
While running the installer for Visual Studio, make sure that the "Desktop development with C++" workload is selected, 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.
For detailed instructions on how to install Visual Studio C++, refer to the following Microsoft articles:
To use Visual Studio 2017 with Simulink Real-Time, additionally refer to the following article:
https://www.mathworks.com/matlabcentral/answers/348269-how-do-i-set-up-microsoft-visual-studio-2017-for-slrt

More Answers (0)

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!

Translated by