很简单的程序,帮忙加个文件头,使程序能够运行,谢了!
创建了一个Win32 Console Application工程文件,在其中定义了一个cpp文件:Test.cpp
代码如下:
#include <iostream>
#include <afx.h>
using namespace std;
int main()
{
CFileStatus fs;
if(CFile::GetStatus("test.txt", fs))
{
cout << "Test success!" << endl;
}
return 0;
}
运行时出现错误:
nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in libcpd.lib(delop.obj)
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Debug/Test001.exe : fatal error LNK1120: 2 unresolved externals
执行 link.exe 时出错.
Creating browse info file...
Test001.exe - 1 error(s), 0 warning(s)
希望帮忙修改下文件头,是程序能够顺利运行,谢了!