MEX function for Matlab R2017b

Hello,
I just installed the MinGW compiler for C and C++ from Add-ons on Matlab R2017b.
However, I still cannot use MEX function.
I am getting this 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."
Grateful if anyone could help me.
Cheers..

3 件のコメント

Walter Roberson
Walter Roberson 2017 年 10 月 16 日
Could you confirm that you used
mex -v -setup C
mex -v -setup C++
to be sure that it configured for MinGW ?
Ayesha Soobhany
Ayesha Soobhany 2017 年 10 月 16 日
編集済み: Walter Roberson 2017 年 10 月 16 日
No, I used mex -setup.
I just tried mex -v -setup C++. And I have the error message:
Verbose mode is on.
... Looking for compiler 'Intel C++ Composer XE 2013 with Microsoft SDK 7.1' ...
... Looking for environment variable 'ICPP_COMPILER14' ...No.
... Looking for environment variable 'ICPP_COMPILER13' ...No.
Did not find installed compiler 'Intel C++ Composer XE 2013 with Microsoft SDK 7.1'.
... Looking for compiler 'Intel C++ Composer XE 2013 with Microsoft Visual Studio 2013' ...
... Looking for environment variable 'ICPP_COMPILER14' ...No.
... Looking for environment variable 'ICPP_COMPILER13' ...No.
Did not find installed compiler 'Intel C++ Composer XE 2013 with Microsoft Visual Studio 2013'.
... Looking for compiler 'Intel Parallel Studio XE 2015 for C++ with Microsoft SDK 7.1' ...
... Looking for environment variable 'ICPP_COMPILER15' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2015 for C++ with Microsoft SDK 7.1'.
... Looking for compiler 'Intel Parallel Studio XE 2015 for C++ with Microsoft Visual Studio 2013' ...
... Looking for environment variable 'ICPP_COMPILER15' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2015 for C++ with Microsoft Visual Studio 2013'.
... Looking for compiler 'Intel Parallel Studio XE 2015 for C++ with Microsoft Visual Studio 2015' ...
... Looking for environment variable 'ICPP_COMPILER15' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2015 for C++ with Microsoft Visual Studio 2015'.
... Looking for compiler 'Intel Parallel Studio XE 2016 for C++ with Microsoft SDK 7.1' ...
... Looking for environment variable 'ICPP_COMPILER16' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2016 for C++ with Microsoft SDK 7.1'.
... Looking for compiler 'Intel Parallel Studio XE 2016 for C++ with Microsoft Visual Studio 2013' ...
... Looking for environment variable 'ICPP_COMPILER16' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2016 for C++ with Microsoft Visual Studio 2013'.
... Looking for compiler 'Intel Parallel Studio XE 2016 for C++ with Microsoft Visual Studio 2015' ...
... Looking for environment variable 'ICPP_COMPILER16' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2016 for C++ with Microsoft Visual Studio 2015'.
... Looking for compiler 'Intel Parallel Studio XE 2017 for C++ with Microsoft SDK 7.1' ...
... Looking for environment variable 'ICPP_COMPILER17' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2017 for C++ with Microsoft SDK 7.1'.
... Looking for compiler 'Intel Parallel Studio XE 2017 for C++ with Microsoft Visual Studio 2013' ...
... Looking for environment variable 'ICPP_COMPILER17' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2017 for C++ with Microsoft Visual Studio 2013'.
... Looking for compiler 'Intel Parallel Studio XE 2017 for C++ with Microsoft Visual Studio 2015' ...
... Looking for environment variable 'ICPP_COMPILER17' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2017 for C++ with Microsoft Visual Studio 2015'.
... Looking for compiler 'Intel Parallel Studio XE 2017 for C++ with Microsoft Visual Studio 2017' ...
... Looking for environment variable 'ICPP_COMPILER17' ...No.
Did not find installed compiler 'Intel Parallel Studio XE 2017 for C++ with Microsoft Visual Studio 2017'.
... Looking for compiler 'MinGW64 Compiler (C++)' ...
... Looking for environment variable 'MW_MINGW64_LOC' ...No.
Did not find installed compiler 'MinGW64 Compiler (C++)'.
... Looking for compiler 'MinGW64 Compiler with Windows 10 SDK or later (C++)' ...
... Looking for environment variable 'MW_MINGW64_LOC' ...No.
Did not find installed compiler 'MinGW64 Compiler with Windows 10 SDK or later (C++)'.
... Looking for compiler 'Microsoft Visual C++ 2012' ...
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 11.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 11.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 11.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 11.0 ...No.
Did not find installed compiler 'Microsoft Visual C++ 2012'.
... Looking for compiler 'Microsoft Visual C++ 2013' ...
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 12.0 ...No.
Did not find installed compiler 'Microsoft Visual C++ 2013'.
... Looking for compiler 'Microsoft Visual C++ 2015' ...
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VC7' 14.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VC7' 14.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7' 14.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7' 14.0 ...No.
Did not find installed compiler 'Microsoft Visual C++ 2015'.
... Looking for compiler 'Microsoft Visual C++ 2017' ...
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 15.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 15.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 15.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 15.0 ...No.
Did not find installed compiler 'Microsoft Visual C++ 2017'.
... Looking for compiler 'Microsoft Windows SDK 7.1 (C++)' ...
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1' InstallationFolder ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v7.1' InstallationFolder ...No.
Did not find installed compiler 'Microsoft Windows SDK 7.1 (C++)'.
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."__
Ayesha Soobhany
Ayesha Soobhany 2017 年 10 月 16 日
I am using MATLAB Support for MinGW-w64 C/C++ Compiler for Windows version 17.2.0.0

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

回答 (0 件)

質問済み:

2017 年 10 月 16 日

編集済み:

2017 年 10 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by