matlab 2021b cant find microsoft visual compiler from vs 2019

21 views (last 30 days)
I saw this is a deep rooted problem with matlab since the 2015 days
I am trying to add the microsoft visual C++ compiler, but matlab can't see it.
i tried installing hte compiler no success, i tried installing microsoft visual studio 2019 (the version that is supposed to be supported from mathworks release notes) still no success, it just tells me it cant find the microsoft visual compiler when i trype in mex -setup -v
help please

Answers (1)

Rishav
Rishav on 9 Oct 2023
Hi Youssef,
I understand that you are facing issues with detecting Visual Studio 2019 using MATLAB R2021b command line.
Uninstall all the versions of Visual studio from your machine. Then download the Visual Studio 2019 from the below mentioned link:
Then run the following command in MATLAB terminal.
>> mex -setup
It should automatically detect the Visual Studio C++ compiler for you and it will also set it if one compiler is installed.
Thank you,
Rishav Saha

Categories

Find more on C Shared Library Integration in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!