Making mex work with R2014a and MacOS 10.9.2

1 Ansicht (letzte 30 Tage)
s
s am 11 Apr. 2014
Kommentiert: Royi Avital am 23 Jun. 2015
I am trying to compile playrec in matlab using mex, so a c++ compiler is needed. I am using OS X 10.9.2, matlab R2014a, and XCode 5.1 .
This is the errors I get:
Error using mex
clang: warning: no such sysroot directory:
'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -std=c99'
In file included from /Users/LordTengil/Downloads/PlayrecForMatlab-playrec-48b4f6a/src/mex_dll_core.c:88:
In file included from /Applications/MATLAB_R2014a.app/extern/include/mex.h:57:
/Applications/MATLAB_R2014a.app/extern/include/matrix.h:23:10: fatal error: 'stdlib.h' file not found
#include <stdlib.h>
^
1 error generated.
The first warning I do not understand: I can find MacOSX10.8.sdk in exactly that directory. I am guessing the error of not finding stdlib.h is because of that first warning.
  2 Kommentare
Miikka Tikander
Miikka Tikander am 24 Mai 2015
Bearbeitet: Walter Roberson am 24 Mai 2015
I get the same error. My setup is OS X 10.10.3, Matlab 2015a, and Xcode 6.3.2. Any suggestions for a fix? There are some fixes modifying the mexoptions.sh -file but that's no longer used in 2015a.
Here's my error message for reference..
Error using mex
clang: warning: no such sysroot directory:
'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
-std=c99'
In file included from /Users/miikka/Documents/Matlab/playrec/m_files/../src/mex_dll_core.c:88:
In file included from /Applications/MATLAB_R2015a.app/extern/include/mex.h:51:
/Applications/MATLAB_R2015a.app/extern/include/matrix.h:23:10: fatal error: 'stdlib.h' file not
found
#include <stdlib.h>
^
1 error generated.
Error in build_mex (line 131)
failed = mex(build_args{:});
Error in compile_playrec_func (line 262)
failed =
build_mex('playrec',all_files,all_include_dirs,compiler_flags,all_link_libs,lib_dirs,extra_flags,debug,verbose);
Error in compile_playrec_gui>compile_button_Callback (line 323)
if compile_playrec_func (get(handles.debug_checkbox,'Value'), ... % debug
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in compile_playrec_gui (line 55)
gui_mainfcn(gui_State, varargin{:});
Error while evaluating UIControl Callback
Royi Avital
Royi Avital am 23 Jun. 2015
@Miikka, have you found a solution?

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Miikka Tikander
Miikka Tikander am 24 Mai 2015
I managed to get mine working with this tip: www.mathworks.com/matlabcentral/answ...
Hope it helps!
-miikka

Walter Roberson
Walter Roberson am 24 Mai 2015
The -std=c99 has been added in as part of the directory name. Notice the closing quote is not until after the -std=c99 . Somewhere in one of the configuration steps, the directory is being configured incorrectly.

Kategorien

Mehr zu Environment and Settings finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by