0

I type mex -setup C in MATLAB 2014b and it shows MEX configured to use 'Xcode with Clang' for C language compilation.

And it doesn't give me options to select. I am sure I have installed GCC on my Mac.

I want to unlink the Xcode and switch the compiler to GCC. Can somebody tell me how to do that?

thanks,

Eric Chiu
  • 23
  • 1
  • 6
  • Is gcc supported for Mac? I can only see that LLVM is supported, but I may be wrong. [Supported compilers](http://se.mathworks.com/support/compilers/R2014b/index.html?sec=maci64) – patrik Feb 23 '15 at 12:07
  • There is a release for Mac. – Eric Chiu Feb 23 '15 at 12:44
  • I understand that, but it is rather if matlab supports the compiler. Looking at MATLAB supported compilers, I cannot see that GCC is supported. The conclusion could then be that mex cannot use GCC for Mac, but again I am not sure about this. You may want to ask this question on matlab answers as well. You should also make sure that you have a 64-bit compiler for matlab 64-bit and so on. – patrik Feb 23 '15 at 13:52
  • Install gcc via homebrew and follow this link https://stackoverflow.com/questions/28970935/osx-replace-gcc-version-4-2-1-with-4-9-installed-via-homebrew/28982564#28982564 – user1896293 Mar 18 '18 at 14:23
  • Install gcc via homebrew and follow this link https://stackoverflow.com/questions/28970935/osx-replace-gcc-version-4-2-1-with-4-9-installed-via-homebrew/28982564#28982564 – user1896293 Mar 18 '18 at 14:25

0 Answers0