Mex compiler MinGW64 only, although msvcpp xmls are in the mexopts folder
Show older comments
Hi,
I am having issues - for whatever reason my previous GPU compile for VS studio 2019 and Matlab 2022a got corrupted and now VS studio no longer offers VS 2019 download.
My exact issue is that the mex -setup C++ only finds MinGW64 and not the VS studio code (msvc2022) although it is in the mexopts folder and VS studio 2022 is download (including the manual C++ library installation).
Mathworks has xmls but it seems mex is not robust enough to find them and does not allow for manual addition of compilers (even though the xmls are thoroughly there in \win64 folder. Does anyone have any ideas how to compile VS studio 2022 with whatever version of MATLAB that works with it. 
9 Comments
Heath Robinson
on 9 Aug 2024
Joss Knight
on 9 Aug 2024
If you are trying to compile CUDA code you should be using mexcuda.
Heath Robinson
on 9 Aug 2024
Heath Robinson
on 9 Aug 2024
Joss Knight
on 10 Aug 2024
Edited: Joss Knight
on 12 Aug 2024
If MATLAB cannot detect VS2022 it must be a fault in the installation, since MATLAB is looking for certain registry entries to detect successful installation. Have you tried reinstalling and/or perhaps uninstalling VS19 first?
Joss Knight
on 10 Aug 2024
You mention VS Code - CUDA does not support this on Windows and I don't think MEX does either, so make sure it's Visual Studio and not Visual Code you have installed
Heath Robinson
on 13 Aug 2024
Heath Robinson
on 13 Aug 2024
Joss Knight
on 16 Aug 2024
Apologies, no intention to impugn your competence. I'm not sure what your problem has to do with GPU. It seems to be just about whether MEX is succeeding in detecting your VS2022 installation. Can you provide the -v verbose output of mexcuda so we can see why it's not detecting your install?
Answers (0)
Categories
Find more on MATLAB Support for MinGW-w64 C/C++ Compiler in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!