installed compiler not found
이전 댓글 표시
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
2020년 11월 12일
0 개 추천
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.
댓글 수: 7
Raphael
2020년 11월 12일
Aghamarsh Varanasi
2020년 11월 13일
편집: Aghamarsh Varanasi
2020년 11월 13일
Hi Raphael,
I get that you have installed MinGW support package from the add-on section of MATLAB.
I suggest you to run these commands in the windows command prompt and give the outputs so that we can try to understand the root cause of the issue. Please ensure that the MinGW installation folder is added to the windows path.
- g++ --version
- g++ -dumpmachine
- mex -setup cpp
Raphael
2020년 11월 15일
Walter Roberson
2020년 11월 15일
run the commands at the windows command prompt not the matlab command prompt.
Shashwat Singh
2024년 3월 7일
Hi @Aghamarsh Varanasi , i don't have the maintenance services enabled to my MATLAB and therefore i am not able to download it from MATLAB addon...so in this situation what can i do to use the Mex compiler.
I have Microsoft Visual C++ 2017 , but still Mex is not able to work with this.
What shall i do in this situation???
Walter Roberson
2024년 3월 7일
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
2020년 11월 15일
0 개 추천
댓글 수: 5
Aghamarsh Varanasi
2020년 11월 16일
Hi Raphael,
Make sure you have 'g++.exe' installed under "C:\ProgramData\MATLAB\SupportPackages\R2020b\3P.instrset\mingw_w64.instrset\bin" folder. If you do not find 'g++.exe', I recommend you to uninstall and re-install the MinGW support package for MATLAB from the Add-Ons Manager.
Raphael
2020년 11월 16일
Aghamarsh Varanasi
2020년 11월 16일
편집: Aghamarsh Varanasi
2020년 11월 16일
Hi Raphael,
You can navigate to the folder that contains the MinGW installation and execute these commands in the "windows command prompt" and send back the output. This helps to get a understanding of the underlying issue.
Steps to execute the following commands :
- Open Windows command prompt, by typing 'cmd' in the windows search bar. Click enter to open the windows command prompt.
- Execute the command
> cd C:\ProgramData\MATLAB\SupportPackages\R2020b\3P.instrset\mingw_w64.instrset\bin
to navigate to the MinGW installation folder
3. Execute the following commands
> .\g++.exe --version
> .\g++.exe -dumpmachine
4. Run the 'mex' setup command in the same location in the windows command prompt
> mex -setup cpp
Thanks
Raphael
2020년 11월 16일
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
카테고리
도움말 센터 및 File Exchange에서 MATLAB Support for MinGW-w64 C/C++ Compiler에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
