mex -setup can't find compiler for MATLAB 2017b on macOS High Sierra 10.13.1 and Xcode 9.1

조회 수: 2 (최근 30일)
I'm trying to add C and C++ compiler for MATLAB 2017b on my mac but it gives error
/bin/bash: sh: command not found
and
Warning: Xcode appears to be installed, but it has not been configured. Run "osascript -e 'do shell script "xcode-select -switch /Applications/Xcode.app" with administrator privileges'" to configure Xcode. You must be an administrator of this computer to complete this action.
So, when I run osacript... it gives error
/bin/bash: osascript: command not found
ans =
127
I already did
sudo xcode-select -switch /Applications/Xcode.app/
and changed
MACOSX_DEPLOYMENT_TARGET="10.13"
which was 10.9 in clang_maci64.xml and clang++_maci64.xml files. Can anybody help me to solve this issue. Thank you.

채택된 답변

Constantin Wiesener
Constantin Wiesener 2017년 11월 13일
You have to add the paths in the
/App../MATLAB../bin/maci64/mexopts/clang++_maci64.xml /App../MATLAB../bin/maci64/mexopts/clang_maci64.xml
to the SDK10.13 inside your XCode. Then it will find the compiler. To check that this is the problem you can run mex -v -setup C++. If it can't find the SDK there you have to add it inside the xml file.
  댓글 수: 1
Esparami
Esparami 2017년 12월 12일
편집: Esparami 2017년 12월 12일
Hi Constantin, could you please explain more about the procedure? I faced the same issue and not sure what do you mean by "add the paths in the ... to the SDK10.13 inside XCode", many thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Troubleshooting in MATLAB Compiler SDK에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by