matlab编译和运行结果不一样,LIBSVM编译问题(好像跟别人都不一样)

【设置编译器,系统是winXP,安装有VC++6.0,C++.NET 2010,下载的LIBSVM最新版3.18】

>> mex -setup

Please choose your compiler for building external interface (MEX) files:

Would you like mex to locate installed compilers [y]/n? y

Select a compiler:

[1] Lcc C version 2.4.1 in D:\MATLAB71\sys\lcc

[2] Microsoft Visual C/C++ version 7.1 in C:\Program Files\Microsoft Visual Studio .NET 2003

[3] Microsoft Visual C/C++ version 6.0 in D:\Microsoft Visual Studio

[0] None

Compiler: 3

Please verify your choices:

Compiler: Microsoft Visual C/C++ 6.0

Location: D:\Microsoft Visual Studio

Are these correct?([y]/n): y

Try to update options file: C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R14SP3\mexopts.bat

From template:              D:\MATLAB71\BIN\win32\mexopts\msvc60opts.bat

Done . . .

***************************************************************************

Warning: The file extension of 32-bit Windows MEX-files was changed

from ".dll" to ".mexw32" in MATLAB 7.1 (R14SP3). The generated

MEX-file will not be found by MATLAB versions prior to 7.1.

Use the -output option with the ".dll" file extension to

generate a MEX-file that can be called in previous versions.

For more information see:

MATLAB 7.1 Release Notes, New File Extension for MEX-Files on Windows

***************************************************************************

【开始编译,一长串华丽的报错,吓得菜鸟我瑟瑟发抖,望大侠指导,万谢,万谢】

先后使用了VC6和.NET平台编译都报差不多相同的错误。

当前目录已设置在 libsvm/matlab ;

搜索目录也添加完毕。

>> make

Warning: argeArrayDims specified with -l option not found on -L path

libsvmread.c

libsvmread.c(64) : error C2065: 'mwIndex' : undeclared identifier

libsvmread.c(64) : error C2065: 'ir' : undeclared identifier

libsvmread.c(64) : error C2065: 'jc' : undeclared identifier

libsvmread.c(64) : error C2100: illegal indirection

libsvmread.c(65) : error C2143: syntax error : missing ';' before 'type'

libsvmread.c(122) : error C2065: 'labels' : undeclared identifier

libsvmread.c(122) : warning C4047: '=' : 'int ' differs in levels of indirection from 'double *'

libsvmread.c(123) : error C2065: 'samples' : undeclared identifier

libsvmread.c(123) : warning C4047: '=' : 'int ' differs in levels of indirection from 'double *'

libsvmread.c(124) : warning C4047: '=' : 'int ' differs in levels of indirection from 'int *'

libsvmread.c(125) : warning C4047: '=' : 'int ' differs in levels of indirection from 'int *'

libsvmread.c(131) : error C2109: subscript requires array or pointer type

libsvmread.c(131) : error C2106: '=' : left operand must be l-value

libsvmread.c(142) : error C2109: subscript requires array or pointer type

libsvmread.c(142) : warning C4244: '=' : conversion from 'double ' to 'int ', possible loss of data

libsvmread.c(142) : error C2106: '=' : left operand must be l-value

libsvmread.c(158) : error C2109: subscript requires array or pointer type

libsvmread.c(158) : error C2064: term does not evaluate to a function

libsvmread.c(161) : error C2109: subscript requires array or pointer type

libsvmread.c(161) : warning C4244: '=' : conversion from 'double ' to 'int ', possible loss of data

libsvmread.c(161) : error C2106: '=' : left operand must be l-value

libsvmread.c(171) : error C2109: subscript requires array or pointer type

libsvmread.c(171) : error C2106: '=' : left operand must be l-value

D:\MATLAB71\BIN\MEX.PL: Error: Compile of 'libsvmread.c' failed.

If make.m fails, please check README about detailed instructions.

>>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值