Using Visual Studio 2015 C++ as C/C++ compiler
12 ビュー (過去 30 日間)
古いコメントを表示
Enrico Anderlini
2016 年 11 月 26 日
コメント済み: Enrico Anderlini
2016 年 11 月 26 日
I am using Matlab v2016b. On my computer, I installed Visual C++ Redistributable for Visual Studio 2015 from the official website https://www.microsoft.com/en-us/download/details.aspx?id=48145 because I would like to use it as C/C++ compiler when I run mex . However, if I run
mex -setup c++
I get the following error:
Error using mex
No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler; see Install MinGW-w64
Compiler. For more options, visit http://www.mathworks.com/support/compilers/R2016b/win64.html.
It is as if Matlab did not see where Visual C is installed. Any tips on how to fix this?
Thank you!
0 件のコメント
採用された回答
Jim Hokanson
2016 年 11 月 26 日
The redistributable is not for compiling code. Per Microsoft: "The Visual C++ Redistributable Packages install run-time components that are required to run C++ applications built using Visual Studio 2015." - i.e. this is something a program developer might install on a software user's computer if the developer used Visual Studio to compile their program.
See this page for a list of supported compilers for 2016b: https://www.mathworks.com/support/compilers/R2016b/
I've personally had some success using TDM-GCC to compile C: https://www.mathworks.com/matlabcentral/fileexchange/52848-matlab-support-for-the-mingw-w64-c-c++-compiler-from-tdm-gcc
It should also support C++
その他の回答 (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!