Error using MEX in matlab r2016b with XCODE Version 8.3.2

1 回表示 (過去 30 日間)
hsw
hsw 2017 年 4 月 28 日
コメント済み: hsw 2017 年 5 月 1 日
I am receiving the error
Error using mex
No supported compiler or SDK was found.
When I try to run mex -setup. I have already modified the clang++_maci64.xml and clang_maci64.xml files to contain
<dirExists name="$$/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" />
<cmdReturns name="find $$ -name MacOSX10.12.sdk" />
But I still get the error. Please advise. Thanks.

回答 (1 件)

Prannay Jain
Prannay Jain 2017 年 5 月 1 日
The error could sometimes happen if the licensing terms of XCode are not accepted. Hence, to fix the issue, XCode can be opened once and when the licensing window comes up, you can accept it. Also, you can also accept the licensing terms of XCode from terminal by running the following command:
sudo xcodebuild -license
In recent versions of XCode you can also accept the terms in single line of command:
sudo xcodebuild -license accept
Also, in R2016b, XCode 8.x is supported only for mex compilation, loadlibrary, and external usage of MATLAB Engine and MAT-files APIs. If you are using mex for something else like creating C/C++/Java libraries, only XCode 6.x and 7.x are supported. Refer to this link for more information:
You could also follow this MATLAB Answers post and as mentioned by Walter Roberson you have to make the changes (that you have mentioned in your post) for both ISYSROOT and SDKVER,
  1 件のコメント
hsw
hsw 2017 年 5 月 1 日
Darn, I need it for creating a c++ library. Is there an easy way to get those xcode versions? thanks!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMATLAB Compiler SDK についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by