📄 subject_15525.htm
字号:
<p>
序号:15525 发表者:天花乱追 发表日期:2002-09-19 09:40:43
<br>主题:运行程序经常出现下面的提示,哪里会出错?
<br>内容:Compiling...<BR>Page_Info.cpp<BR>Linking...<BR>LINK : fatal error LNK1168: cannot open Debug/student.exe for writing<BR>Error executing link.exe.<BR><BR>而重新开机后又正常了
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:披着鸽毛的鹰 回复日期:2002-09-19 09:43:11
<br>内容:目标文件被锁定,无法写入,肯定是你上次运行的时候没有正常退出吧,检查你的程序吧。
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:小戟 回复日期:2002-09-19 09:54:09
<br>内容:打开的程序没有关闭
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:whn 回复日期:2002-09-19 10:19:45
<br>内容:你上次运行的时候没有退出
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:天花乱追 回复日期:2002-09-19 10:38:38
<br>内容:是的,我再step by step debug到某一步的时候就给退出了,好像先前打开过数据库,是否有关系?不过我在这里用了try catch的,请看。。。<BR><BR>void CPage_Info::OnBtnadd() <BR>{<BR> // TODO: Add your control notification handler code here<BR> try<BR> { <BR> UpdateData(TRUE);<BR><BR> if(!ifUpdateData)<BR> { <BR><BR> m_Name="";<BR> m_Number=NULL; //最好可以给出参考值<BR> m_Birthday=StrToSYSTEMTIME("1990-01-01");<BR> m_Gender=0;<BR> m_Grade="1";<BR> m_Class="1";<BR> m_Address="";<BR> m_cName.SetFocus();<BR><BR> }<BR> else<BR> { //更新数据库<BR> TRACE("Update the database");<BR> CString strSQL;<BR>// TRACE("%4d-%2d-%2d","20020809");//m_Birthday);<BR> strSQL.Format("insert into students(name,number,birthday) values ('%s',%d,'%Y-%m-%d')",m_Name,m_Number,m_Birthday);//这里有错误<BR>// ('%s',%d)",m_Name,m_Number);<BR>// birthday,gender,grd,cls,addr) values ('%s','%d','%Y-%m-%d','%s','%s','%s','%s')","ljl",99,"1990-02-03","男","1","1","sfdlsk");<BR>// m_Name,m_Number,m_Birthday,m_Gender,m_Grade,m_Class,m_Address);<BR> dbStudent.ExecuteSQL(strSQL);<BR> m_cName.SetFocus();<BR> TRACE("\nHere you are!!!!!!!!!\n");<BR><BR> }<BR> ifUpdateData=!ifUpdateData;<BR> UpdateData(FALSE);<BR>}<BR> catch (CException *e)<BR> {<BR> // AfxMessageBox(STRF("Error writing file %s. Options not saved.", OPTIONSFILE));<BR> AfxMessageBox("Quit!");<BR> dbStudent.Close(); //是否这里应该加上关闭数据库的语句?????<BR> e->Delete();<BR> }<BR><BR><BR>}
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:Tuu Puu 回复日期:2002-09-19 11:44:33
<br>内容:象上面所说你的程序没有退出,最简单的是到“任务列表”中把这个进程杀掉。另外这时你到相关生成文件目录下删除原来的那个exe文件也删不掉。
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:天花乱追 回复日期:2002-09-19 11:54:39
<br>内容:任务列表里面好像没有显示这个名称的进程(至少没有显示正常运行是显示的那个),而且似乎我删除debug目录也可以的
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:Tuu Puu 回复日期:2002-09-20 08:53:38
<br>内容:那我搞错了,我遇到提示这个时通常是这个原因。这个提示就是不能覆盖写Debug/student.exe,你再查查看是不是运行了什么病毒防火墙、网络防火墙类软件在捣乱
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:天花乱追 回复日期:2002-09-21 02:15:52
<br>内容:debug以后有这样的提示:<BR><BR>Detected memory leaks!<BR>Dumping objects -><BR>strcore.cpp(118) : {368} normal block at 0x00782AB0, 269 bytes long.<BR> Data: < > 01 00 00 00 06 00 00 00 00 01 00 00 CD F5 BC D2 <BR>strcore.cpp(118) : {367} normal block at 0x00782C60, 269 bytes long.<BR> Data: < 1 > 01 00 00 00 01 00 00 00 00 01 00 00 31 00 CD CD <BR>strcore.cpp(118) : {366} normal block at 0x00782DA0, 269 bytes long.<BR> Data: < 4 > 01 00 00 00 01 00 00 00 00 01 00 00 34 00 CD CD <BR>strcore.cpp(118) : {362} normal block at 0x00782970, 269 bytes long.<BR> Data: < > 01 00 00 00 06 00 00 00 00 01 00 00 CD F5 CF FE <BR>{63} normal block at 0x00781AA0, 44 bytes long.<BR> Data: < > FF FF FF FF CD CD CD CD CD CD CD CD CD CD CD CD <BR>{62} normal block at 0x00781B00, 8 bytes long.<BR> Data: < x > 00 00 00 00 A0 1A 78 00 <BR>{59} normal block at 0x00781B40, 48 bytes long.<BR> Data: < > FF FF FF FF CD CD CD CD CD CD CD CD CD CD CD CD <BR>{58} normal block at 0x00781BA0, 8 bytes long.<BR> Data: < @ x > 00 00 00 00 40 1B 78 00 <BR>{55} normal block at 0x00781BE0, 84 bytes long.<BR> Data: < > FF FF FF FF CD CD CD CD CD CD CD CD CD CD CD CD <BR>{54} normal block at 0x00781E20, 8 bytes long.<BR> Data: < x > 00 00 00 00 E0 1B 78 00 <BR>dlgprop.cpp(947) : {53} normal block at 0x00781C60, 120 bytes long.<BR> Data: <( @ S > 28 00 00 00 A1 00 00 00 00 00 40 00 84 0B 53 00 <BR>array_p.cpp(110) : {52} normal block at 0x00781D10, 20 bytes long.<BR> Data: < Bg Eg XEg > EC 42 67 00 E8 45 67 00 58 45 67 00 CD CD CD CD <BR>E:\student\studentDlg.cpp(135) : {50} client block at 0x00674260, subtype 0, 1112 bytes long.<BR>a CStudentSheet object at $00674260, 1112 bytes long<BR>Object dump complete.<BR>The thread 0xFFFB7D4D has exited with code 32772 (0x8004).<BR>The program 'E:\student\Debug\student.exe' has exited with code 32772 (0x8004).<BR>是不是有内存泄漏,该如何去找那里有问题:((,着急ing~~~~<BR>2002-9-21 2:20:23
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -