在matlab中运行mex文件的问题!
第一次使用mex文件,不知道怎么用的,请高手请教!
mex -setup
Please choose your compiler for building external interface (MEX) files:
Would you like mex to locate installed compilers [y]/n? mex -setup
Select a compiler:
[1] Lcc C version 2.4 in E:\MATLAB7\sys\lcc
[0] None
Compiler: 1
Please verify your choices:
Compiler: Lcc C 2.4
Location: E:\MATLAB7\sys\lcc
Are these correct?([y]/n): y
Try to update options file: C:\Users\kangping\Application Data\MathWorks\MATLAB\R14\mexopts.bat
From template: E:\MATLAB7\BIN\WIN32\mexopts\lccopts.bat
Done . . .
>> make
Error svm.cpp: 13 syntax error; found `<' expecting `;'
Error svm.cpp: 13 skipping `<'
Error svm.cpp: 13 syntax error; found `T' expecting `;'
Error svm.cpp: 13 syntax error; found `>' expecting `;'
Error svm.cpp: 13 skipping `>'
Error svm.cpp: 13 syntax error; found `T' expecting `;'
Error svm.cpp: 13 syntax error; found `min' expecting `;'
Error svm.cpp: 13 syntax error; found `x' expecting `)'
Error svm.cpp: 13 skipping `x' `,' `T' `y'
Error svm.cpp: 13 undeclared identifier `x'
Error svm.cpp: 13 undeclared identifier `y'
Warning svm.cpp: 13 possible usage of x before definition
Warning svm.cpp: 13 possible usage of y before definition
Error svm.cpp: 16 syntax error; found `<' expecting `;'
Error svm.cpp: 16 skipping `<'
Error svm.cpp: 16 syntax error; found `T' expecting `;'
Error svm.cpp: 16 syntax error; found `>' expecting `;'
Error svm.cpp: 16 skipping `>'
Error svm.cpp: 16 syntax error; found `T' expecting `;'
Error svm.cpp: 16 syntax error; found `max' expecting `;'
Error svm.cpp: 16 syntax error; found `x' expecting `)'
Error svm.cpp: 16 skipping `x' `,' `T' `y'
Error svm.cpp: 16 too many errors
E:\MATLAB7\BIN\WIN32\MEX.PL: Error: Compile of 'svm.cpp' failed.
??? Error using ==> mex
Unable to complete successfully
Error in ==> make at 5
mex -O -c svm.cpp
好像.cpp文件编译不过去,但是.c文件就没有报错,不知道是什么原因……
[解决办法]
没见过这问题,帮你顶帖
[解决办法]
好像只能在C盘,不能放在E盘吧