Why can't MEX find a supported compiler in MATLAB R2015a after I upgraded to Xcode 7.3?

4 次查看(过去 30 天)
I'm having a very similar problem to this issue. I recently installed Xcode 7.3 and am running Matlab 2015a. When I try and use Mex I get this error:
>> mex -setup
Warning: Xcode is installed, but its license has not been accepted. Run Xcode and accept its
license agreement.
Error using mex
No supported compiler or SDK was found. For options, visit
http://www.mathworks.com/support/compilers/R2015a/maci64.html.
Unfortunately the solution for the previous issue doesn't work. I tried clearing up the "license not accepted warning" by upgrading to Xcode 7.3, but it persisted. I'm not sure if it's connected to the "no supported compiler" error. How do I fix this?
Edit: Adding a bit of information in case it's helpful. Running 'which clang' or 'which gcc' in Matlab gives me the following:
>> which gcc
'gcc' not found.
>> which clang
'clang' not found.
However I get the following in Terminal:
$ xcodebuild -find clang
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
$ xcodebuild -find gcc
/Applications/Xcode-beta.app/Contents/Developer/usr/bin/gcc

回答(3 个)

Anushalakshmi Manila
I have the same problem too!

Walter Roberson
Walter Roberson 2016-1-22
You need to start XCode and click to agree to its license. After that you will be able to run.
  3 个评论
Greg
Greg 2016-1-22
编辑:Greg 2016-1-22
Thank you very much for helping. There's no Downloads tab in Xcode 7.3. Following the instructions here http://stackoverflow.com/questions/15371925/how-to-check-if-command-line-tools-is-installed it looks like Command Line Tools was not installed. I installed it by typing 'xcode-select --install' in Terminal. After installation I rebooted and restarted Matlab. But the problem persists - I get the same error when I try to use mex in Matlab. Any idea of what I could try next? Thanks again.

请先登录,再进行评论。


kmiller
kmiller 2016-3-14
I am experiencing the exactly same problem. No solutions by the MATLAB developers two months later?

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by