필터 지우기
필터 지우기

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

조회 수: 121 (최근 30일)
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
Federico Flores Richaud
Federico Flores Richaud 2022년 3월 23일
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?

댓글을 달려면 로그인하십시오.

채택된 답변

Jimmy Lapierre
Jimmy Lapierre 2022년 3월 29일
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
Federico Flores Richaud
Federico Flores Richaud 2022년 3월 30일
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!

댓글을 달려면 로그인하십시오.

추가 답변 (3개)

Benjamin Thompson
Benjamin Thompson 2022년 3월 22일
편집: Benjamin Thompson 2022년 3월 22일
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 2022년 6월 23일
i can't add the microsoft visual c++ compiler as well to my 2021b version of matlab, can you help me please

CB
CB 2024년 7월 6일 1:57
Microsoft Visual Studio 2022 set up as default C and C++ compiler in Matlab 2023b
2023b does support MSVS2022, but...
If you are installing on Win10 when the "Desktop development with C++" workload is selected the default SDK is for Win11, you can uncheck that and save 2GB of space and check a Win10 SDK further down the list.

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by