Simulink could not detect an installed compiler though MATLAB Support for MinGW-w64 C/C++ Compiler installed
34 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
I have installed MATLAB Support for MinGW-w64 C/C++ Compiler downloaded from MATLAB file exchange. MATLAB coder and Simulink Coder are also installed successfully. However, when I tried to compile a Simulink model it told me that "an installed compiler was not detected". MATLAB and Simulink have also been restarted after I installed the compiler.
MATLAB has version R2018b.
It would be highly appreciated if you could provide any suggestions or solutions to this problem. Thank u :)
2 个评论
Vinai Datta Thatiparthi
2020-2-3
Hello Han,
What's the output of this line of code from the command window -
mex -setup c
mex -setup c++
回答(1 个)
Vinai Datta Thatiparthi
2020-2-4
Hi Han,
It seems like you do have a compiler installed.
Here's a link to an answer that resolves the same issue that you describe: https://www.mathworks.com/matlabcentral/answers/92585-why-do-i-receive-the-error-message-an-installed-compiler-was-not-detected-when-compiling-a-model-f
Additionally, here's a link to all the supported and compatible compilers and their configuration: https://www.mathworks.com/support/requirements/supported-compilers.html
Hope this helps!
2 个评论
Vinai Datta Thatiparthi
2020-2-5
编辑:Vinai Datta Thatiparthi
2020-2-5
Hey Han,
If you look at the second link that I posted (list of Supported and Compatible Compilers) for the Simulink Product family, you'll notice that MinGW is not a compatible compiler for Simulink Real Time. That's why you get the error. Microsoft Visual C++ would be required to run Simulink Real Time. The original question that you posted was regarding MATLAB/Simulink, for which MinGW works fine.
Hope this helps!
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!