在编译这么简单的程序时出现的错误,在线等待
//hello world
#include <afxwin.h>
#include "H.h"
CMyApp myApp;
BOOL CMyApp::InitInstance ()
{
m_pMainWnd = new CMainWindow;
m_pMainWnd->ShowWindow (m_nCmdShow);
m_pMainWnd->UpdateWindow ();
return TRUE;
}
/////////////////////////////////////////////////////////////////////////
// CMainWindow message map and member functions
BEGIN_MESSAGE_MAP (CMainWindow, CFrameWnd)
ON_WM_PAINT ()
END_MESSAGE_MAP ()
CMainWindow::CMainWindow ()
{
Create (NULL, _T ("The Hello Application"));
}
void CMainWindow::OnPaint ()
{
CPaintDC dc (this);
CRect rect;
GetClientRect (&rect);
dc.DrawText (_T ("Hello, MFC"), -1, &rect,
DT_SINGLELINE | DT_CENTER | DT_VCENTER);
}
class CMyApp : public CWinApp
{
public:
virtual BOOL InitInstance ();
};
/////////////////////////////////////////////////////////////////////////
// CMyApp member functions
class CMainWindow : public CFrameWnd
{
public:
CMainWindow ();
protected:
afx_msg void OnPaint ();
DECLARE_MESSAGE_MAP ()
};
test7 error LNK2019: 无法解析的外部符号 __endthreadex ,该符号在函数 "void __stdcall AfxEndThread(unsigned int,int)" (?AfxEndThread@@YGXIH@Z) 中被引用
test7 error LNK2019: 无法解析的外部符号 __beginthreadex ,该符号在函数 "public: int __thiscall CWinThread::CreateThread(unsigned long,unsigned int,struct _SECURITY_ATTRIBUTES *)" (?CreateThread@CWinThread@@QAEHKIPAU_SECURITY_ATTRIBUTES@@@Z) 中被引用
test7 fatal error LNK1120: 2 个无法解析的外部命令
为什么啊,