MATLAB: Xcode error, plz help


Helo, I am using OS X Yosemite, version 10.10.5. The matlab using is matlab2014b. The Xcode using is Xcode-beta. when I am trying to simulate a simulink file with user defined matlab program, the following error appears. I tried a lot to eliminate the error but nothing works. plz help.
Warning: Xcode appears to be installed, but it has not been configured. Run "osascript -e 'do shell script "xcode-select -switch /Applications/" with administrator privileges'" to configure Xcode. You must be an administrator of this computer to complete this action.
No supported compiler or SDK was found. For options, visit gmake: * [solar_module8_sfun.o] Error 255 Component: Make | Category: Make error

Best Answer

Start up the Terminal application, which you can find in /Applications/Utilities . When you get to the command prompt, command
sudo xcode-select -switch /Applications/
and authenticate when it prompts you for your password.
After that xcode will be selected and you should be able to proceed.
Note: be sure that the files have been edited as described in and notice the prefdir files mentioned in the comments on one of the Answers in that Question.