嘿试图在MatLab中编译一个C文件,但我收到了这个错误,我正试图理解它.非常感谢任何和所有指导.
>> mex BDS_unpack_mex5.c
xcrun: error: SDK "macosx10.7" cannot be located
clang: warning: no such sysroot directory: '-mmacosx-version-min=10.7'
BDS_unpack_mex5.c:17:10: fatal error: 'math.h' file not found
#include <math.h>
^
1 error generated.
mex: compile of ' "BDS_unpack_mex5.c"' failed.
Error using mex (line 206)
Unable to complete successfully.
最佳答案 为了解决这个编译
here或一般如问题,我理解这一点
$sed -ie 's@10.7@10.9@g' /Applications/MATLAB_R2013b.app/bin/mexopts.sh
在运行之前检查你的Sed味道.根据comment,你需要再次编译Xcode.等待升级……
也许是相关问题
> How to ignore `mexopts.sh` when compiling MEX files for Matlab?