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

2 visualizaciones (últimos 30 días)
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.

Respuesta aceptada

Constantin Wiesener
Constantin Wiesener el 13 de Nov. de 2017
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 comentario
Esparami
Esparami el 12 de Dic. de 2017
Editada: Esparami el 12 de Dic. de 2017
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!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Troubleshooting in MATLAB Compiler SDK en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by