Mex file error when installing libsvm on macosx elcapitan with xcode 7.1.1. and MATLAB R2013a

조회 수: 1 (최근 30일)
Hi there,
I have just updated to OSX ELCapitan 10.11.1 and have MATLAB R2013a and XCode 7.1.1 and trying to install libsvm. I have followed the procedures that I had posted earlier in the following post
which includes the solution proposed in the following links
On compiling the
mex -setup
I am getting
Options files control which compiler to use, the compiler and link command
options, and the runtime libraries to link against.
Using the 'mex -setup' command selects an options file that is
placed in /Users/HP/.matlab/R2013a and used by default for 'mex'. An options
file in the current working directory or specified on the command line
overrides the default options file in /Users/HelenPanni/.matlab/R2013a.
To override the default options file, use the 'mex -f' command
(see 'mex -help' for more information).
The options files available for mex are:
1: /Applications/MATLAB.app/bin/mexopts.sh :
Template Options file for building MEX-files
0: Exit with no changes
Enter the number of the compiler (0-1):
1
Overwrite /Users/HP/.matlab/R2013a/mexopts.sh ([y]/n)?
y
/Applications/MATLAB.app/bin/mexopts.sh is being copied to
/Users/HP/.matlab/R2013a/mexopts.sh
And when I run file
make.m
I am getting this error
clang: warning: no such sysroot directory: '-mmacosx-version-min=10.11'
libsvmread.c:1:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
1 error generated.
mex: compile of ' "libsvmread.c"' failed.
If make.m fails, please check README about detailed instructions.

채택된 답변

Omer
Omer 2015년 11월 21일
Ok I have got it working just need to change line 136 to this
CFLAGS="-fno-common -arch $ARCHS -isysroot $MW_SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -Dchar16_t=UINT16_T"
Follow the above mentioned steps and change line 136 to the above it will work.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by