Running 2016b Matlab Coder on macOS Ventura 13.6.3

I would like to generate C code using Matlab Coder for a legacy project that requires Matlab 2016b.
I am on an M1 Mac on macOS Ventura 13.6.3. When I run
mex -setup c
I see the following output:
find: 89283: No such file or directory
find: 89291: No such file or directory
find: 89299: No such file or directory
Error using mex
No supported compiler or SDK was found. For options, visit http://www.mathworks.com/support/compilers/R2016b/maci64.html.
The required compiler for Matlab 2016b is Xcode 6.x or 7.x (source). I installed Xcode 7.3.1. I get the same response from Matlab 2016b as above, and when I try to open Xcode 7.3.1, macOS says that this version of Xcode is not supported and that I can get the latest from the Mac App Store.
Any ideas on how I can generate C and compile MEX in 2016b?
In case it's relevant, Matlab 2023b is able to generate C and MEX outputs. And when I run
mex -setup C
I get this expected output:
MEX configured to use 'Xcode with Clang' for C language compilation.

Answers (1)

You cannot run R2016b on an M1 Mac. R2020b Update 3 is the earliest release with Apple Silicon support.
No supported compiler or SDK was found. For options, visit http://www.mathworks.com/support/compilers/R2016b/maci64.html.
That error message indicates that you are running on an Intel Mac, not an M1 Mac (M1 is always Apple Silicon)

1 Comment

Thanks for responding, Walter.
So I am able to run Matlab 2016b on my M1 Mac. Software not built for Apple Silicon will run via Rosetta 2. I can run my scripts in 2016b without a problem. The problem is with Coder finding a compiler, not core Matlab.
I'm not sure what you mean by "That error message indicates that you are running on an Intel Mac, not an M1 Mac (M1 is always Apple Silicon)". That is the message I see on 2016b on my M1 Mac.

Sign in to comment.

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Products

Release

R2016b

Asked:

on 20 Jan 2024

Commented:

on 22 Jan 2024

Community Treasure Hunt

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

Start Hunting!