how to configure matlab for a C ++ compiler ?
1 view (last 30 days)
Show older comments
I am working on Matlab version 2016b , i already have a microsoft visual c++ 2013 installed in my system. But when i give the mex - setup command , i am getting the following message.... No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler; see Install MinGW-w64 Compiler.
I tried downloading this compiler as well but didnt work....
0 Comments
Answers (1)
Anjaneyulu Bairi
on 29 Oct 2024
Hi,
I understand that you are getting errors related to mex setup. In R2021a and earlier releases, when installing the MinGW compiler, the system environment variable MW_MINGW64_LOC is set with the path to the installation folder,but if this environment variable is not added after the installation, or after restarting MATLAB or rebooting your PC, it may give error as "No supported compiler or SDK found".
Run the following command in MATLAB:
getenv('MW_MINGW64_LOC')
If you get ans= 0x0 , then it confirms that environment variable is not set.
Add it to the path enviroment variable by followig below syntax.
Variable name : MW_MINGW64_LOC , Value: <SupportPackageRoot>\3P.instrset\mingw_w64.instrset and <SupportPackageRoot> is the output of below commnad:
matlabshared.supportpkg.getSupportPackageRoot
Now, running the 'getenv' command in MATLAB should return the desired value, and you should be able to select the MinGW64 compiler using mex-setup.
I hope this helps.
0 Comments
See Also
Categories
Find more on Troubleshooting in MATLAB Compiler SDK 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!