byuflowlab/Mex.jl

Xcode build error when using mex

Closed this issue · 0 comments

On macOS 10.15.4 with Julia 1.5:
Although mex -setup C++ goes through just fine, the mexjulia build process throws:

Error using mex
xcodebuild: error: SDK "macosx10.15.4" cannot be located.
xcrun: error: sh -c
'/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk
macosx10.15.4 -find clang++ 2> /dev/null' failed with exit code 16384: (null)
(errno=No such file or directory)
xcrun: error: unable to find utility "clang++", not a developer tool or in PATH

This .m-snippet
This issue is more on the side of Matlabs Xcode integration, I however thought I post the solution here in case someone runs into the same issue as it did cost me half a day.