Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22000

Compiling LIBSVM for Matlab R2016a

$
0
0

I want to use LiBSVM with Matlab R2016a under Windows 7 64 Bit with the MinGW64 compiler and the precompiled mex files didn't work for me.When I tried to run the standard make file that comes with LibSVM the following error occurs:*Building with 'MinGW64 Compiler (C)'.Error using mexgcc: error: -fexceptions: No such file or directory*The makefile looks like this:

mex CFLAGS="\$CFLAGS -std=c99" -largeArrayDims libsvmread.cmex CFLAGS="\$CFLAGS -std=c99" -largeArrayDims libsvmwrite.cmex CFLAGS="\$CFLAGS -std=c99" -I.. -largeArrayDims svmtrain.c ../svm.cpp svm_model_matlab.cmex CFLAGS="\$CFLAGS -std=c99" -I.. -largeArrayDims svmpredict.c ../svm.cpp svm_model_matlab.c

In another answer to a stackoverflow question I saw that somebody used this code for compiling:

mex -O -largeArrayDims libsvmread.cmex -O -largeArrayDims libsvmwrite.cmex -O -I.. -largeArrayDims svmtrain.c ../svm.cpp svm_model_matlab.cmex -O -I.. -largeArrayDims svmpredict.c ../svm.cpp svm_model_matlab.c

This also works for me. What is the difference between the two ways of compiling LibSVM and are there any disadvantages of using the second option?

edit:this is the so question I mentioned: http://ch.mathworks.com/matlabcentral/newsreader/view_thread/297195after doing a bit more research I understood that -std=c99 selects a c language version which is not fully implemented for gcc under windows and -O optimizes the object code. In http://www.csie.ntu.edu.tw/~cjlin/libsvm/faq.html#f213 the developers mention that they actually did not use any c99 languge features.So compiling the library should have no disadvantages, right?


Viewing all articles
Browse latest Browse all 22000

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>