how to configure matlab for a C ++ compiler ?
14 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Anjaneyulu Bairi
2024-10-29,11:52
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Troubleshooting in MATLAB Compiler SDK 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!