Why does MATLAB still fail to "mex -setup C" after I have installed Sierra on my mac?

1 view (last 30 days)
Patrick on 19 Apr 2017
Answered: Ankita Nargundkar on 26 Apr 2017
I upgraded to Sierra from Yosemite on my Mac recently while I have been using MATLAB 2016a with a professional license and then later 2016b with a home license (for testing toolbox functionality). When I enter "mex -setup C" in 2016a now I get the following error: Error using mex
No supported compiler or SDK was found.
When I enter "mex -setup C" in 2016b I get:
MEX configured to use 'Xcode with Clang' for C language compilation. Warning: The MATLAB C and Fortran API has changed to support MATLAB variables with more than 2^32-1 elements. In the near future you will be required to update your code to utilize the new API. You can find more information about this at: http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html. I found the Mathworks Support Team MATLAB Answers webpage titled "Why does MATLAB fail to load my preferred language on macOS Sierra?". The "Language and Region" tab in my System Preferences is set to "English" and "United States" so that wasn't the cause of my compiler error in 2016a - which is the version with the compiler error I want to fix. I am aware of 2016a having a compatibility issue here:
I downloaded the patch and it gave a successful message after I implemented it. I also tried including the sierraLocaleDetector.p in my current folder and then tried "sierraLocaleDetector" in the MATLAB command window but I still get the compiler error. I should also mention that I have a slew of trial tools and toolboxes INCLUDING THE MATLAB COMPILER AND COMPILER SDK in their SECOND MONTH of use on my MATLAB 2016a - I don't know if this has anything to do with the problem.
Any sort of help at all in getting my 2016a compiler to stop giving me the error I mentioned above would be greatly appreciated.

Answers (1)

Ankita Nargundkar
Ankita Nargundkar on 26 Apr 2017
As mentioned in this link macOS sierra is not a supported operating system for R2016a. It means that R2016a was not fully tested with macOS sierra and even if you are able to get past this error, you may face other issues when compiling your MATLAB application. There will be very limited support available for the same
It is recommended to use El Capitan or Yosemite only for R2016a. However, macOS sierra is completely supported on R2016b. So you can either consider compiling your application on R2016b or downgrade the macOS version.

Community Treasure Hunt

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

Start Hunting!