installed compiler not found

129 次查看(过去 30 天)
Raphael
Raphael 2020-11-5
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?

回答(2 个)

Aghamarsh Varanasi
Aghamarsh Varanasi 2020-11-12
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.
  7 个评论
Shashwat Singh
Shashwat Singh 2024-3-7
编辑:Shashwat Singh 2024-3-7
Hi @Walter Roberson , first of all thanks for the quick reply.....when i am going to above link which you have mentioned, then it is downloading "mingw.mlpkginstall" and when i am double clicking on it then it is giving me below error...
Connection Error
The application could not connect to MathWorks. For more information on resolving this issue, see this Support Article.
Please help if you know the resolution

请先登录,再进行评论。


Raphael
Raphael 2020-11-15
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 个评论
Raphael
Raphael 2020-11-16
Here is the output:
C:\ProgramData\MATLAB\SupportPackages\R2020b\3P.instrset\mingw_w64.instrset\bin>.\g++.exe --version
g++.exe (x86_64-posix-seh-rev2, Built by MinGW-W64 project) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
C:\ProgramData\MATLAB\SupportPackages\R2020b\3P.instrset\mingw_w64.instrset\bin>.\g++.exe -dumpmachine
x86_64-w64-mingw32
C:\ProgramData\MATLAB\SupportPackages\R2020b\3P.instrset\mingw_w64.instrset\bin>mex -setup cpp
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.
Aghamarsh Varanasi
Aghamarsh Varanasi 2020-11-16
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

请先登录,再进行评论。

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by