mex and C/C++ compiler error

4 views (last 30 days)
DARIO BENVEGNÙ
DARIO BENVEGNÙ on 23 Dec 2022
Edited: DARIO BENVEGNÙ on 23 Dec 2022
I'm trying to setup the compliers for C/C++ code generation on MATLAB R2022a, to generate audio plugins to be used in DAWs.
I'm using a macOs Ventura 13.1 system, I installed Xcode version 14.2, but when i try to setup the code compiler with the commands
"mex -setup", "mex -setup C" or "mex -setup C++" I always get the following error message, the same I got before installing Xcode
this is what i get as output:
>> mex -setup
Error using mex
Supported compiler not detected. For options, visit https://www.mathworks.com/support/compilers.
>> mex -setup C
Error using mex
Supported compiler not detected. For options, visit https://www.mathworks.com/support/compilers.
>> mex -setup C++
Error using mex
Supported compiler not detected. For options, visit https://www.mathworks.com/support/compilers.
>> mex -setup -v
Verbose mode is on.
... Looking for compiler 'Xcode with Clang' ...
... Looking for environment variable 'DEVELOPER_DIR' ...No.
... Executing command 'xcode-select -print-path' ...Yes ('/Library/Developer/CommandLineTools').
... Looking for folder '/Library/Developer/CommandLineTools' ...Yes.
... Executing command 'which xcrun' ...
Yes ('/usr/bin/xcrun').
... Looking for folder '/usr/bin' ...Yes.
... Executing command 'defaults read com.apple.dt.Xcode IDEXcodeVersionForAgreedToGMLicense' ...No.
... Executing command 'defaults read /Library/Preferences/com.apple.dt.Xcode IDEXcodeVersionForAgreedToGMLicense' ...Yes ('14.2').
... Executing command '
agreed=14.2
if echo $agreed | grep -E '[\.\"]' >/dev/null; then
lhs=`expr "$agreed" : '\([0-9]*\)[\.].*'`
rhs=`expr "$agreed" : '[0-9]*[\.]\(.*\)$'`
if echo $rhs | grep -E '[\."]' >/dev/null; then
rhs=`expr "$rhs" : '\([0-9]*\)[\.].*'`
fi
if [ $lhs -gt 4 ] || ( [ $lhs -eq 4 ] && [ $rhs -ge 3 ] ); then
echo $agreed
else
exit 1
fi
fi' ...Yes ('14.2').
... Executing command 'xcrun -sdk macosx --show-sdk-path' ...No.
Did not find installed compiler 'Xcode with Clang'.
Error using mex
Supported compiler not detected. For options, visit https://www.mathworks.com/support/compilers.
any help will be highly appreciated
  2 Comments
Geoff Hayes
Geoff Hayes on 23 Dec 2022
@DARIO BENVEGNÙ - from the above error message, the link for MAC seems to suggest that Xcode14.x is not yet supported. Can you install 13.x instead?

Sign in to comment.

Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!