Unable to set up C++ compiler
21 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello,
I've been trying for so long to set up the required addons to run my code in MATLAB GPU. I had to install and configure various addons for the same, one such is C++ compiler. I installed MinGW64 and placed it in varous locations in my computer and run the coder.checkGpuInstall(full). Matlab isn't recognising MinGW 64 at all. I've also tried changing the directory address.
Someone please help me with it...
3 Commenti
Walter Roberson
il 2 Ott 2024
You do not indicate which MATLAB release this is for.
MATLAB R2023a generally supports VS2022, but does not support VS2022 for GPU compilation.
Your symptoms are in line with the possibility that you are running R2023a.
Risposte (1)
nick
il 1 Ott 2024
Hi Annamalai,
I understand from your query that MinGW64 is not recognized in MATLAB command window. Please make sure that the version of MinGW-w64 installed on the system is compatible with version of MATLAB. You can check MATLAB's supported compilers in the following documentation :
After ensuring that the bin directory of the MinGW-w64 installation is added to the system PATH environment variable, kindly open a new MATLAB session. You can use the following command to display information about the available compiler for C++ for building MEX files:
mex -setup C++ -v
If MinGW64 is shown as an available compiler in the list, you can use the 'lang' option to change the default compiler for C++.
Aternatively, MATLAB provides an add-on for MinGW-w64, 'MATLAB Support for MinGW-w64 C/C++/Fortran Compiler', which can be installed through the Add-On Explorer. To open the Add-On Explorer, navigate to the Home tab. In the Environment section, click the Add-Ons icon. You can refer the following documentation to know more about the add-on :
2 Commenti
nick
il 3 Ott 2024
Modificato: nick
il 3 Ott 2024
The function 'coder.checkGpuInstall' is part of the product 'GPU Coder'. Kindly use the following documentation to identify the compatible C++ compiler with GPU Coder for the MATLAB release installed on your system:
For example, according to this documentation for GPU Coder in MATLAB R2024b, Microsoft Visual C++ 2022, not MinGW, is the supported C++ compiler.
Vedere anche
Categorie
Scopri di più su MATLAB Support for MinGW-w64 C/C++ Compiler in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!