mex -setup doesn't give option to select or search for compilers

1 回表示 (過去 30 日間)
Rustin Bergren
Rustin Bergren 2016 年 10 月 4 日
コメント済み: Zakia wani 2018 年 1 月 28 日
I'm using R2016b on Windows and have a number of compilers installed. Previously I had MINGW installed via the add-on and that worked; however, I need to use MSVC. Typing `mex -setup` immediately produces the following error with no option to search for installed compilers or make a selection.
>> mex -setup
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.

回答 (1 件)

Sayam Ganguly
Sayam Ganguly 2017 年 8 月 7 日
Hi,
from the error it seems that you don't have any C++ compilers installed on your machine. Here's a link for the supported compilers in R2016b. Since you want to use Visual C++ as you compiler please take note of following points:
  1. Only Professional edition is supported for Microsoft Visual Studio 2012/2013/2015.
  2. If you have professional then make sure that you have installed the C++ compiler. It may not be part of the standard installation of Visual Studio hence you will need to do a custom installation.
  3. Finally if you don't have Professional edition then you need to install Microsoft Visual studio 2017 and add a patch to MATLAB. The instructions for the patch can be found here. With this patch added R2016b supports all the editions of Visual Studio 2017.
  1 件のコメント
Zakia wani
Zakia wani 2018 年 1 月 28 日
I am using MATLAB 2017a and VS 2017, windows 10. i added the patch but still when i execute mex -setup . it still cannot find the VS C++ conpilers.. any suggestion please.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeTroubleshooting in MATLAB Compiler SDK についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by