Clear Filters
Clear Filters

matlab does not see C/C++ compilers

27 views (last 30 days)
Al Ne
Al Ne on 17 Feb 2024
Answered: Mark McBroom on 28 Feb 2024
Hello!
I am trying to deal with the GPU coder to generate the CUDA code for a simple example of matrix multiplication. The first problem i encountered was the absence of the compiler. i used the mex -setup function and matlab did not find any compilers. i have installed the MinGw using the guide descrined in https://www.mathworks.com/matlabcentral/answers/313298-i-already-have-mingw-on-my-computer-how-do-i-configure-it-to-work-with-matlab?s_tid=ans_recom_leaf and i could generate CPU code using the GPU coder. However. when i tried to generate the GPU code i got this error "Warning: Selected MEX compiler 'MinGW64 Compiler (C++)' is not supported for GPU code generation. Refer to the GPU Coder documentation for a list of supported GPU MEX compilers. ". I have installed the Visual C++ 2015-2022 and Visual Studio Community 2022 but matlab does not see this compilter when using the mex -setup and mex -v -setup functions. Moreover, it does not also see the MinGw compilter so i set the path manually. Can anyone give me a hint or suggestions how to connect matlab with Visual C++ compiler? Matlab version is 2023a and CUDA toolkit version is 11.8

Accepted Answer

Mark McBroom
Mark McBroom on 28 Feb 2024
The link you followed for installing the mingw compiler is obsolete. You should use the Add-On Manager to install the proper mingw compiler for your version of MATLAB. https://www.mathworks.com/help/matlab/matlab_external/install-mingw-support-package.html

More Answers (0)

Products


Release

R2023b

Community Treasure Hunt

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

Start Hunting!