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 个评论
Han Wang
Han Wang 2020-2-3
Thank you for your response.
The outputs are as follows:
MEX configured to use 'MinGW64 Compiler (C)' for C language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. You will be required
to update your code to utilize the new API.
You can find more information about this at:
https://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
MEX configured to use 'MinGW64 Compiler (C++)' for C++ language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. You will be required
to update your code to utilize the new API.
You can find more information about this at:
https://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
BTW, will the system target file in Simulink configuration make a difference in this problem?
Thank u if you could share more on this subject.

请先登录,再进行评论。

回答(1 个)

Vinai Datta Thatiparthi
Hi Han,
It seems like you do have a compiler installed.
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 个评论
Han Wang
Han Wang 2020-2-4
Hi Thatiparthi,
Thank you for answering.
I have noticed in the page you provided about the similar issue that if I am attempting Simulink Real Time, MinGW will not work. Does this still exist for R2018b version? I discovered that there was only "Code generation" in settings/configuration of Simulink. Are they the same? (Sorry about a poor knowledge concerning the product)
Could I install Visual Studio C++ for compiler instead when MinGW isn't compatible?
Vinai Datta Thatiparthi
编辑: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!

Translated by