Matlab change default compiler from LCC to C++ not working.

12 Ansichten (letzte 30 Tage)
Pedro Carranza Velez
Pedro Carranza Velez am 13 Mai 2023
I am working on developping an audio plugin on matlab. I manage to get it to validate, but I'm getting the following issue with generateAudioPlugin:
>> cfg = coder.config('lib');
>> cfg.TargetLang = 'C++';
>> mex -setup C++
MEX configured to use 'MinGW64 Compiler (C++)' for C++ language compilation.
>> validateAudioPlugin myVocoder
Checking plugin class 'myVocoder'... passed.
Generating testbench file 'testbench_myVocoder.m'... done.
Running testbench... passed.
Generating mex file 'testbench_myVocoder_mex.mexw64'... done.
Running mex testbench... passed.
Deleting testbench.
Ready to generate audio plugin.
>> generateAudioPlugin -vst3 myVocoder
..Warning: Selected C compiler is incompatible with C99 (ISO) language standard. Code generation will switch to C89/90 (ANSI) instead.
Consider changing C compiler or target language setting to suppress this warning.
??? The specified code generation target is configured to generate C++, but the C-only compiler, LCC, is the default compiler. To allow
code generation, you can deselect the 'Generate makefile' option. Or, to specify a C++ compiler, enter 'mex -setup' at the command
prompt. To generate C code, set the target language to C in the configuration object.
Code generation failed: View Error Report
Error using coder.internal.generateAudioPlugin
Error in generateAudioPlugin
Error in generateAudioPlugin
Error in generateAudioPlugin
As you can see, I do set mex and default targer language to C++. Why does it keep using LCC as the default compiler? How can I change it?

Antworten (1)

Pedro Carranza Velez
Pedro Carranza Velez am 13 Mai 2023
I managed to solve the issue. Turns out Mingw is not supported for audio plugin generation
  2 Kommentare
Javier
Javier am 29 Okt. 2023
What did you do to solve it?
Pedro Carranza Velez
Pedro Carranza Velez am 29 Okt. 2023
I can't remember the specifics, but I downloaded a C/C++ compiler other than MinGW64, then using mex -setup I selected this new compiler and it worked.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Call C++ from MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by