I am using Macbook air (macOS Sierra) and Matlab-R2016a

1 view (last 30 days)
I am new to Matlab and I am unable to understand why this error is coming up and how to solve it
>>gcc --version
Undefined function or variable 'gcc'.
>> mex -setup
Error using mex
No supported compiler or SDK was found

Answers (1)

Walter Roberson
Walter Roberson on 24 Nov 2017
You will need to install XCode, and then you will need to launch XCode once in order to agree to the license. After that, see https://www.mathworks.com/matlabcentral/answers/243868-mex-can-t-find-compiler-after-xcode-7-update-r2015b#comment_454130 for the configuration file you need for XCode on Sierra; the location to install to is given in my comment two up from that one.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!