[Libsvm]libsvm for matlab compilation error on mac

Haoxiang Li bio photo By Haoxiang Li

Error:

>> make
/bin/bash: -c: line 0: unexpected EOF while looking for matching `"'
/bin/bash: -c: line 1: syntax error: unexpected end of file
??? Error using ==> mex at 208
Unable to complete successfully.

Error in ==> make at 5
mex -O -largeArrayDims -I..\ -c ..\svm.cpp

Fix:

  1. Under folder ./libsvm-3.1/matlab
  2. Open file make.m
  3. replace backslash(\) to slash(/)
  4. save and close file
  5. execute the make command inside matlab


Error:

>> make
i686-apple-darwin10-gcc-4.2.1: svm.obj: No such file or directory
i686-apple-darwin10-gcc-4.2.1: svm_model_matlab.obj: No such file or directory

    mex: link of ' "svmtrain.mexmaci64"' failed.

??? Error using ==> mex at 208
Unable to complete successfully.

Error in ==> make at 7
mex -O -largeArrayDims -I../ svmtrain.c svm.obj svm_model_matlab.obj

Fix:

  1. Open the make.m file again
  2. Replace all the occurrences of .obj to .o
  3. Save and close
  4. Try again!

Hope these help :]