Trying to compile a C mex file in MatLab

advertisements

Hey trying to compile one C-file in MatLab, but I got this error and I'm trying to make sense of it. Any and all guidance is greatly appreciated.

>> 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.


In order to solve this compiling here or generally as in the question, I understand this so that

$ sed -ie '[email protected]@[email protected]' /Applications/MATLAB_R2013b.app/bin/mexopts.sh

where check your Sed flavour before running this. According to the comment you need compile Xcode again. Waiting for the upgrade...

Perhaps related questions

  • How to ignore `mexopts.sh` when compiling MEX files for Matlab?