毕业论文开发语言企业开发JAVA技术.NET技术WEB开发Linux/Unix数据库技术Windows平台移动平台嵌入式论文范文英语论文
您现在的位置: 毕业论文 >> 开发语言 >> 正文

matlab中运行mex文件CPP文件无法编译

更新时间:2012-6-21:  来源:毕业论文

第一次使用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盘吧 

设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优尔论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。