Unable to compile my .c files using the mex command under OS X.10.5 and Xcode 7.0
2 次查看(过去 30 天)
显示 更早的评论
when trying to compile my c files using the mex command I got the following message
Error using mex No supported compiler or SDK was found. For options, visit http://www.mathworks.com/support/compilers/R2015b/maci64.html.
when typing the 'mex -setup' command I got:
MEX configured to use 'Xcode with Clang' for C language compilation. Warning: The MATLAB C and Fortran API has changed to support MATLAB variables with more than 2^32-1 elements. In the near future you will be required to update your code to utilize the new API. You can find more information about this at: http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
To choose a different C compiler, select one from the following:
Xcode with Clang mex -setup:/Users/LouisGiraudet/.matlab/R2015b/mex_C_maci64.xml C Xcode with Clang mex -setup:/Applications/MATLAB_R2015b.app/bin/maci64/mexopts/clang_maci64.xml C
To choose a different language, select one from the following: mex -setup C++ mex -setup FORTRAN >> I did the modification indicated in the matlab central link
It looks like some other link requires to be updated. Thanks for your reply
0 个评论
回答(2 个)
Rahul Goel
2015-9-28
Louis,
This happens because MATLAB 2015b suports only Xcode 5.1+ or 6.x. However, with the recent upgrade of Xcode to 7.0, it became unrecognizable for MATLAB. You can try the following:
1. Go to preferences directory. You can get the path to this folder by executing:
>> prefdir
on the MATLAB command prompt.
2. Ensure that there is no mex_*.xml file present in this folder, delete if there are any.
3. Replace the MEX option files present in "MATLABROOT/bin/maci64/mexopts" directory with the ones attached in a zip file( "files.zip") with this post.
4. Restart the MATLAB.
Hope this helps
2 个评论
Greg
2016-1-22
I'm experiencing a similar problem and posted about it here http://www.mathworks.com/matlabcentral/answers/264599-why-can-t-mex-find-a-supported-compiler-in-matlab-r2015a-after-i-upgraded-to-xcode-7-3. This solution didn't work for me. Any suggestions?
Eman
2018-10-10
Hi, Thank you for your post. I have the same problem but I work on Mac, so I can not apply the same solution. Could any one help me? Thank you
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!