subject_16943.htm

来自「一些关于vc的问答」· HTM 代码 · 共 12 行

HTM
12
字号
<p>
序号:16943 发表者:偷着乐 发表日期:2002-10-06 11:58:46
<br>主题:为什么CFileFind用不了,看源程序及出错信息请入内。
<br>内容:源程序如下:功能:列出当前目录下的文件(大概是这个样子吧,类似 dir *.*),编译时出错。<BR><BR>#include &lt;iostream.h&gt;<BR>#include &lt;afx.h&gt;<BR>#include &lt;windows.h&gt;<BR><BR><BR>int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)<BR>{<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;CFileFind finder;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BOOL bWorking = finder.FindFile("*.*");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while (bWorking)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bWorking = finder.FindNextFile();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cout &lt;&lt; (LPCTSTR) finder.GetFileName() &lt;&lt; endl;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 0;<BR>}<BR><BR>出错信息如下:--------------------Configuration: test - Win32 Debug--------------------<BR>Compiling...<BR>test.cpp<BR>Linking...<BR>nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex<BR>nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex<BR>Debug/test.exe : fatal error LNK1120: 2 unresolved externals<BR>Error executing link.exe.<BR><BR>test.exe - 3 error(s), 0 warning(s)<BR><BR>不知道这是为什么?有哪位大哥能帮帮我吗?为什么编译不能通过呢?有什么解决办法没有?<BR><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>回复者:Norton AntivVirus 回复日期:2002-10-06 12:13:34
<br>内容:Project-&gt;Setting-&gt;general-&gt;microsoft foundation calass-&gt;use mfc in a shared dll
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?