Microsoft Visual Studio 2022 set up as default C and C++ compiler in Matlab 2021a

118 visualizzazioni (ultimi 30 giorni)
That´s my need. It´s installed but Matlab doesn´t know that it is.
if I put: mex -setup, Microsoft visual studio doesn´t appear.
Thank you very much for helping!
What must I do in order to set Visual Studio as the Matlab C and C++ Compiler?
My default Compiler now is mingw64-g++ but I want to generate an audio plugin and it can´t be compiled, this is the message:
"Error using generateAudioPlugin
Toolchain 'MinGW64 Compiler (C++)' is not supported for generating audio plug-ins. Use one
of the following:
Microsoft Visual C++ 2017
Microsoft Visual C++ 2015."
Visual C++ is already installed in my desktop but how can I integrate it to MATLAB in order to be the compiler in use with it?
  2 Commenti
Federico Flores Richaud
Federico Flores Richaud il 23 Mar 2022
What must I do in order to set Visual Studio as the Matlab C and C++ Compiler?
My default Compiler now is mingw64-g++ but I want to generate an audio plugin and it can´t be compiled, this is the message:
"Error using generateAudioPlugin
Toolchain 'MinGW64 Compiler (C++)' is not supported for generating audio plug-ins. Use one
of the following:
Microsoft Visual C++ 2017
Microsoft Visual C++ 2015."
Visual C++ is already installed in my desktop but how can I integrate it to MATLAB in order to be the compiler in use?

Accedi per commentare.

Risposta accettata

Jimmy Lapierre
Jimmy Lapierre il 29 Mar 2022
Plugin generation is part of the Audio Toolbox, which does not support MinGW. For plugins:
  • VS 2019 was added to R2019b (appears to be missing from the error message).
  • VS 2022 is planned for R2022a update 1. This and other releases subject to change.
For the latest, check the supported compilers page, including the link in the top right corner for previous releases.
  2 Commenti
Federico Flores Richaud
Federico Flores Richaud il 30 Mar 2022
I installed VS 2019. MATLAB R2021a recognized it, I set up MEX to use it as C++ compiler and it worked fine. Matlab generated the audio plugin. Thanks a lot Jimmy!

Accedi per commentare.

Più risposte (2)

Benjamin Thompson
Benjamin Thompson il 22 Mar 2022
Modificato: Benjamin Thompson il 22 Mar 2022
This was added in R2021B Update 3. Not sure if R2021A will ever get this update. VS 2022 was release only very recently.

Youssef Elshebani
Youssef Elshebani il 23 Giu 2022
i can't add the microsoft visual c++ compiler as well to my 2021b version of matlab, can you help me please

Categorie

Scopri di più su Troubleshooting in MATLAB Compiler SDK in Help Center e File Exchange

Prodotti


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by