I try to install SVMstruct http://www.robots.ox.ac.uk/~vedaldi/code/svm-struct-matlab.html. When executing
make
I get the following error in my Terminal:
mex CC='gcc' LD='gcc' -largeArrayDims -maci64 CFLAGS='$CFLAGS -m64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.4 -Wall' LDFLAGS='$LDFLAGS -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.4' -outdir "build/maci64/" -c "svm_struct_learn_custom.c"
/bin/sh: mex: command not found
make: *** [build/maci64/svm_struct_learn_custom.o] Error 127
Does someone know how to solve this problem?

 채택된 답변

Geoff Hayes
Geoff Hayes 2014년 10월 12일

0 개 추천

Pia - did you download svm-struct-matlab-1.2, or a previous version? Have you built MEX functions before, or is this the first time?
The README_MATLAB.txt indicates that To compile this software use the included Makefile. It should work out of the box on Linux and Mac OS X provided that MATLAB MEX program is in the command line path. So just issue make...
It then goes on to say that if MEX is not on the command line, the path can be specified as
make MEX=<MATLABROOT>/bin/mex
where MATLABROOT is the path returned by running matlabroot in the MATLAB Command Window.
If that doesn't work, it may be that you don't have a C/C++ compiler installed. In the MATLAB Command Window, type
mex -setup
What do you see when you do this? When I run the above (on OS X 10.8.5), I see
MEX configured to use 'Xcode with Clang' for C language compilation.
I had to download Xcode in order to compile C/C++ functions. See Mac OS X supported compilers for details.

댓글 수: 2

Thanks a lot, it works! Adding the path MATLABROOT to the MAKEFILE solved the problem.
I replaced
MEX ?= mex
with
MEX ?= <MATLABROOT>/bin/mex
Great!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

카테고리

도움말 센터 및 File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

태그

질문:

Pia
2014년 10월 12일

댓글:

2014년 10월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by