MATLAB Answers

installed compiler not found

24 views (last 30 days)
Raphael
Raphael on 5 Nov 2020
I have installed the MinGW-w64 compiler but I still get an error message when trying to compile a cc file:
>> mex -setup c
MEX configured to use 'MinGW64 Compiler (C)' for C language compilation.
>> mex -setup c++
Error using mex
No supported compiler was found. You can install the freely available MinGW-w64 C/C++ compiler;
see Install MinGW-w64 Compiler. For more options, visit
>> mex 'keyInject_setFocus.cc'
Error using mex
No supported compiler was found. You can install the freely available MinGW-w64 C/C++ compiler;
see Install MinGW-w64 Compiler. For more options, visit
The same works fine on Matlab 2017b. Suggestions?

Answers (2)

Aghamarsh Varanasi
Aghamarsh Varanasi on 12 Nov 2020
Hi Raphael,
Firstly, make sure that you have installed the complete version of the MinGW compiler from the add-on section of MATLAB, as custom installations of MinGW compiler may not be compatible with MATLAB.
If this issues still persists and is only occurring after restarting MATLAB, here is a workaround.
  4 Comments
Walter Roberson
Walter Roberson on 15 Nov 2020
run the commands at the windows command prompt not the matlab command prompt.

Sign in to comment.


Raphael
Raphael on 15 Nov 2020
Oops. But now I am getting 'c:\ProgramData\...full_path ...\g++' is not recognized as an internal or external command, operable program or batch file
  5 Comments
Aghamarsh Varanasi
Aghamarsh Varanasi on 16 Nov 2020
Hi Raphael,
I understand that you have installed MinGW support package for MATLAB, but are not able to setup mex.
The outputs that you for the commands also suggest the same. As I am not able to reproduce the same at my end, I suggest you contact MathWorks support to resolve the issue.
Thanks

Sign in to comment.

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by