1

I installed Matlab on my Windows 7 machine and I also have MSVC 2012 and Cygwin.

I am trying to compile some library using MEX in Cygwin using Makefile, but for some reason, MEX always tries to use Visual C++ 2012 instead of my gcc.

How can I tell MEX to use gcc instead?

SomethingSomething
  • 11,491
  • 17
  • 68
  • 126
  • 1
    Which version of MATLAB is this? Make sure you are only trying to set a compiler that is supported by **your** MATLAB version. [Here's a list of supported compilers for R2015b](http://www.mathworks.com/support/compilers/R2015b/index.html). – Dev-iL Nov 15 '15 at 16:47
  • 2014a or 2014b, I am not sure. The GCC is from the latest Cygwin version – SomethingSomething Nov 15 '15 at 19:54

1 Answers1

0

Type mex -setup into the Command Window and follow the instructions to select your choice of compiler.

misaligar
  • 315
  • 3
  • 14