Matlab change default compiler from LCC to C++ not working.
10 views (last 30 days)
Show older comments
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?
0 Comments
Answers (1)
See Also
Categories
Find more on MATLAB Support for MinGW-w64 C/C++ Compiler 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!