generateAudioPlugin error - MEX configured to use visual studio c++ 2019, but LCC is the default compiler
    5 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Pedro Dores
 el 7 de Abr. de 2021
  
    
    
    
    
    Comentada: Jimmy Lapierre
    
 el 15 de Mayo de 2023
            OS: Windows 10 Home
As the thread title indicates, when I attempt to generate an audio plugin (after running mex -setup to configure MEX to use visual studio c++ 2019 and validateAudioPlugin) this appears on the console:
>> mex -setup
MEX configured to use 'Microsoft Visual C++ 2019 (C)' for C language compilation.
To choose a different language, select one from the following:
 mex -setup C++ 
 mex -setup FORTRAN
MEX configured to use 'Microsoft Visual C++ 2019' for C++ language compilation.
>> validateAudioPlugin('TremoloProj6')
Checking plugin class 'TremoloProj6'... passed.
Generating testbench file 'testbench_TremoloProj6.m'... done.
Running testbench... passed.
Generating mex file 'testbench_TremoloProj6_mex.mexw64'... done.
Running mex testbench... passed.
Deleting testbench.
Ready to generate audio plugin.
>> generateAudioPlugin('TremoloProj6')
..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
I've been searching for information on how to change the target language, but I have not been able to find anything that works when I use it.
Here's the code for the audio plugin I'm trying to generate:
classdef TremoloProj6 < audioPlugin
    methods
        function out = process(~,in)
            out = in;
        end
    end
end
0 comentarios
Respuesta aceptada
  Pedro Dores
 el 7 de Abr. de 2021
        2 comentarios
  Jimmy Lapierre
    
 el 3 de Mayo de 2021
				What about setting up the C++ option?
>> mex -setup C++
Más respuestas (1)
  Pedro Carranza Velez
 el 13 de Mayo de 2023
        I am having the same issue that you had, but your solution is not working. What else can you remember doing?
2 comentarios
  Jimmy Lapierre
    
 el 15 de Mayo de 2023
				Do you have Visual Studio? Did you do "mex -setup C++" to select it?
Ver también
Categorías
				Más información sobre Audio Plugin Creation and Hosting en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


