Search code examples
matlabmexmingw-w64

Matlab 2015a set mingw64 as mex compiler


I have Matlab2015a 64bit running on Win7 and I want to use Mingw-w64 compiler for mex files but the command *

mex -setup

says

MEX configured to use 'Microsoft Visual C++ 2012 (C)' for C language compilation.

I have installed Mingw-w6 compiler in

C:\mingw-w64\x86_64-4.9.2-win32-seh-rt_v4-rev4\mingw64\bin

I even had a look at this question, but I could'n solve it.

How can I switch to Mingw gcc compiler?


Solution

  • To see which compilers are supported by your MATLAB version and OS go to

    mathworks.com/support/compilers/VERSION/index.html 
    

    where VERSION is your version. i.e.

    mathworks.com/support/compilers/R2015a/index.html

    If a compiler is not there, then you can not use it. In your case, its not there.