一,在安装libsvm时出现了下面的错误提示:
>> mex -setup
错误使用 mex
未找到支持的编译器或 SDK。有关选项,请访问
http://www.mathworks.com/support/compilers/R2014a/win64。
这其实是因为64位的matlab不带编译器,而我本机又没有安装过Visual Studio所以会提示找不到编译器,这里以安装Visual Studio 2012为例演示。(Visual Studio 2012 中文旗舰版下载)。安装的时候将所有的内容都安装上就可以了。安装过程非常简单,不再介绍。
二,安装完成后重新启动一下matlab,然后再试就能找到编译器了。
>> mex -setup
MEX 配置为使用 ‘Microsoft Visual C++ 2012 (C)’ 以进行 C 语言编译。
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. In the near future
you will be required to update your code to utilize the
new API. You can find more information about this at:
http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
要选择不同的语言,请从以下选项中选择一种命令:
mex -setup C++
mex -setup FORTRAN
三。然后选择编译器,并进行编译就可以了