shanghai 发表于 2006-4-18 17:03

请帮我看看这是什么错误(混合编程)很急

<P>我用matcom把m文件编译成.exe文件如下:<BR>#line 1 "c:/matcom45/新建文件夹/linennet_143.m"<BR>    dMm(P); dMm(T); dMm(w_range); dMm(b_range); dMm(ES); dMm(w); dMm(b); dMm(A); dMm(E); dMm(SSE); dMm(p); dMm(a);\<BR>    <BR><BR>#line 2 "c:/matcom45/新建文件夹/linennet_143.m"<BR>call_stack_begin;<BR>#line 2 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ clf(TM("reset"));<BR>#line 3 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ display( figure((CL(gcf()))) );<BR>#line 4 "c:/matcom45/新建文件夹/linennet_143.m"<BR>//setfsize(300,300);<BR>#line 5 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ echo(TM("on"));<BR>mt_print_handler("clc\n");<BR>#line 6 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ display(clc());<BR>mt_print_handler("\n");<BR><BR>mt_print_handler("% INITLIN -对神经元的权值和阈值进行初始化\n");<BR>#line 8 "c:/matcom45/新建文件夹/linennet_143.m"<BR>// INITLIN -对神经元的权值和阈值进行初始化<BR>mt_print_handler("% SIMULIN -对神经元进行仿真\n");<BR>#line 9 "c:/matcom45/新建文件夹/linennet_143.m"<BR>// SIMULIN -对神经元进行仿真<BR>mt_print_handler("% TRAINWH -利用神经元学习规则对线性神经元训练\n");<BR>#line 10 "c:/matcom45/新建文件夹/linennet_143.m"<BR>// TRAINWH -利用神经元学习规则对线性神经元训练<BR>mt_print_handler("pause\n");<BR>#line 11 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ display(pauseM());<BR>mt_print_handler("clc\n");<BR>#line 12 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ display(clc());<BR>mt_print_handler("% P 为输入向量\n");<BR>#line 13 "c:/matcom45/新建文件夹/linennet_143.m"<BR>// P 为输入向量<BR>mt_print_handler("P=;\n");<BR>#line 14 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ P = (BR(1.0),-1.2);<BR>mt_print_handler("% T 为目标向量\n");<BR>#line 15 "c:/matcom45/新建文件夹/linennet_143.m"<BR>// T 为目标向量<BR>mt_print_handler("T = ;\n");<BR>#line 16 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ T = (BR(0.5),1.0);<BR>mt_print_handler("pause \n");<BR>#line 17 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ display(pauseM());<BR>mt_print_handler("clc\n");<BR>#line 18 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ display(clc());<BR>mt_print_handler("\n");<BR><BR>mt_print_handler("w_range=-1:0.1:1;\n");<BR>#line 20 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ w_range = colon(-1.0,0.1,1.0);<BR>mt_print_handler("b_range=-1:0.1:1;\n");<BR>#line 21 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ b_range = colon(-1.0,0.1,1.0);<BR>mt_print_handler("ES=errsurf(P,T,w_range,b_range,'purelin');\n");<BR>#line 22 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ ES = errsurf(P,T,w_range,b_range,TM("purelin"));<BR>mt_print_handler("plotes(w_range,b_range,ES);\n");<BR>#line 23 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ plotes(w_range,b_range,ES);<BR>mt_print_handler("pause\n");<BR>#line 24 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ display(pauseM());<BR>mt_print_handler("clc\n");<BR>#line 25 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ display(clc());<BR>mt_print_handler("\n");<BR><BR>mt_print_handler("% 初始化权值和阈值\n");<BR>#line 27 "c:/matcom45/新建文件夹/linennet_143.m"<BR>// 初始化权值和阈值<BR>mt_print_handler("=solvelin(P,T);");<BR>#line 28 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ /* = */solvelin(P,T,i_o,w,b);<BR>mt_print_handler(" \n");<BR><BR>mt_print_handler("\n");<BR><BR>mt_print_handler("pause\n");<BR>#line 30 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ display(pauseM());<BR>mt_print_handler("clc\n");<BR>#line 31 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ display(clc());<BR>mt_print_handler("\n");<BR><BR>mt_print_handler("A=simulin(P,w,b);\n");<BR>#line 33 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ A = simulin(P,w,b);<BR>mt_print_handler("E=T-A;\n");<BR>#line 34 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ E = T-A;<BR>mt_print_handler("SSE=sumsqr(E)\n");<BR>#line 35 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ SSE = sumsqr(E); display(SSE);<BR>mt_print_handler("pause\n");<BR>#line 36 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ display(pauseM());<BR>mt_print_handler("clc\n");<BR>#line 37 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ display(clc());<BR>mt_print_handler("plotes(w_range,b_range,ES);\n");<BR>#line 38 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ plotes(w_range,b_range,ES);<BR>mt_print_handler("plotep(w,b,SSE);\n");<BR>#line 39 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ plotep(w,b,SSE);<BR>mt_print_handler("pause;\n");<BR>#line 40 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ pauseM();<BR>mt_print_handler("clc\n");<BR>#line 41 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ display(clc());<BR>mt_print_handler("p=-1.1;\n");<BR>#line 42 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ p = -1.1;<BR>mt_print_handler("a=simulin(p,w,b)\n");<BR>#line 43 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ a = simulin(p,w,b); display(a);<BR>mt_print_handler("echo off\n");<BR>#line 44 "c:/matcom45/新建文件夹/linennet_143.m"<BR>_ echo(TM("off"));<BR>call_stack_end;<BR><BR>添加到Vc++工程中后编译出现下面的错误提示:<BR><BR>--------------------Configuration: linennet - Win32 Debug--------------------<BR>Compiling resources...<BR>Compiling...<BR>StdAfx.cpp<BR>Compiling...<BR>linennet.cpp<BR>linennetDlg.cpp<BR>errsurf.cpp<BR>feval.cpp<BR>linennet_143.cpp<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2065: 'P' : undeclared identifier<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2501: 'dMm' : missing storage-class or type specifiers<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2065: 'T' : undeclared identifier<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2501: 'dMm' : missing storage-class or type specifiers<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2086: 'dMm' : redefinition<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2065: 'w_range' : undeclared identifier<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2501: 'dMm' : missing storage-class or type specifiers<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2086: 'dMm' : redefinition<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2065: 'b_range' : undeclared identifier<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2501: 'dMm' : missing storage-class or type specifiers<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2086: 'dMm' : redefinition<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2065: 'ES' : undeclared identifier<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2501: 'dMm' : missing storage-class or type specifiers<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2086: 'dMm' : redefinition<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2065: 'w' : undeclared identifier<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2501: 'dMm' : missing storage-class or type specifiers<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2086: 'dMm' : redefinition<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2065: 'b' : undeclared identifier<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2501: 'dMm' : missing storage-class or type specifiers<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2086: 'dMm' : redefinition<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2065: 'A' : undeclared identifier<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2501: 'dMm' : missing storage-class or type specifiers<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2086: 'dMm' : redefinition<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2065: 'E' : undeclared identifier<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2501: 'dMm' : missing storage-class or type specifiers<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2086: 'dMm' : redefinition<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2065: 'SSE' : undeclared identifier<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2501: 'dMm' : missing storage-class or type specifiers<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2086: 'dMm' : redefinition<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2065: 'p' : undeclared identifier<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2501: 'dMm' : missing storage-class or type specifiers<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2086: 'dMm' : redefinition<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2065: 'a' : undeclared identifier<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2501: 'dMm' : missing storage-class or type specifiers<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2086: 'dMm' : redefinition<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2501: 'call_stack_begin' : missing storage-class or type specifiers<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2146: syntax error : missing ';' before identifier 'clf'<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : error C2501: '_' : missing storage-class or type specifiers<BR>c:/matcom45/新建文件夹/linennet_143.m(2) : fatal error C1004: unexpected end of file found<BR>nntobsf.cpp<BR>nntobsu.cpp<BR>plotep.cpp<BR>plotes.cpp<BR>purelin.cpp<BR>simulin.cpp<BR>solvelin.cpp<BR>sumsqr.cpp<BR>Error executing cl.exe.</P>
<P>linennet.exe - 39 error(s), 0 warning(s)<BR><BR>请大家帮我看看,应该怎么改?</P>

happy 发表于 2006-4-19 21:17

回复:(shanghai)请帮我看看这是什么错误(混合编程)...

你发的东西也太乱了<br>编译过程中有没有出现什么问题吧<br><br>另外首先建议把中文文件夹换成英文的,乱死了
[此贴子已经被作者于2006-4-19 21:18:59编辑过]
页: [1]
查看完整版本: 请帮我看看这是什么错误(混合编程)很急