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

13 次查看(过去 30 天)
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?

回答(1 个)

Pedro Carranza Velez
I managed to solve the issue. Turns out Mingw is not supported for audio plugin generation
  2 个评论
Pedro Carranza Velez
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by