Mex MinGW64 problem

Hello,
i have a problem with MinGW64 Compiler (c).
Matlab Version: R2018B
Issuse:
I am trying to build an s-function by compiler MinGW64, in Matlab is everything set correctly, but still, I am receiving the error that the compiler dost not exist. I already try to reinstall MinGW64 but It did not help.
Matlab command window:
>> mex -setup
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.
To choose a different C compiler, select one from the following:
MinGW64 Compiler (C) mex -setup:C:\Users\z637879\AppData\Roaming\MathWorks\MATLAB\R2018b\mex_C_win64.xml C
Microsoft Visual C++ 2015 (C) mex -setup:C:\app\MATLAB\R2018b\bin\win64\mexopts\msvc2015.xml C
Microsoft Visual C++ 2017 (C) mex -setup:C:\app\MATLAB\R2018b\bin\win64\mexopts\msvc2017.xml C
To choose a different language, select one from the following:
mex -setup C++
mex -setup FORTRAN
build log:
No supported compiler was found. You can install the freely available MinGW-w64 C/C++ compiler; visit https://www.mathworks.com/help/matlab/matlab_external/install-mingw-support-package.html. For more options, visit https://www.mathworks.com/support/compilers.

6 Comments

Which version of mingw64 do you have installed? Your release does not support the latest version.
Hi,
I installed: MinGw_Compiler_R2018b (1462267954), so i dont now exactli whitch version i have, but befor installation i had to fix some bug becuase the installation did not work. For bug fix i used this topic:https://www.mathworks.com/support/bugreports/1741173
so the version is 6.3
Would you just happen to be trying to build for Simulink Real Time? MinGW 6.3 is supported in R2018b for all Simulink related compiling except Simulink Real Time.
No, I need to build from my C file the function for simulink :)
Hey Jan.
Have you solved your problem?
We did run into the same behaviour.
Best Regards
Dennis

Sign in to comment.

Answers (0)

Asked:

on 12 Feb 2020

Commented:

on 22 Jul 2020

Community Treasure Hunt

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

Start Hunting!