MATLAB: How to install a supported compiler for MATLAB 7.12 (R2011a) for the Mac OS X platform

applefreeinstallmacMATLABososxpaidxxcode

I found on the following page that I need Apple Xcode for MathWorks products that need a supported compiler:
This page states Xcode is free of charge, but Apple asks $4.99 for Xcode. How do I install a free version of Xcode for MathWorks products?

Best Answer

It is possible that Xcode is already installed and you only need to configure the compiler in MATLAB. To accomplish this run the following command:
mex -setup
Xcode is part of the Restore Discs that came with the Mac and is also included in the Installation Disc of the OS X operating system. You could install Xcode from these media.
Alternatively you could download Xcode from Apple's website. For the R2011a release of MathWorks products the version of Xcode that is supported is 3.2. Although Xcode 4.x is not free, Xcode 3.2 is still available free of charge from Apple's website.
In order to download Xcode from Apple's website you need to have an Apple ID and you need to be registered as an Apple developer. You can create a new ID or register as a developer with your current ID at the following webpage:
https://developer.apple.com/programs/enroll/
Once you are registered as an Apple Developer with your Apple ID, you can download Xcode 3.2 from:
Related Question