MFC程序,编译正确,连接错误
#include <afxwin.h>class CMFCDemoApp:public CWinApp
{
public:
virtual BOOL InitInstance();
};
class cmainframe:public CFrameWnd
{
public:
cmainframe();
};
cmainframe::cmainframe()
{
Create(NULL,"windows");
}
BOOL CMFCDemoApp::InitInstance()
{
m_pMainWnd=new cmainframe();
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
return true;
}
CMFCDemoApp theapp;
以上是代码,下面是错误:
--------------------Configuration: MFCDemo - Win32 Debug--------------------
Linking...
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Debug/MFCDemo.exe : fatal error LNK1120: 2 unresolved externals
执行 link.exe 时出错.
MFCDemo.exe - 1 error(s), 0 warning(s)