读书人

fatal error LNK1561: 务必定义入口点

发布时间: 2013-09-08 15:21:21 作者: rapoo

fatal error LNK1561: 必须定义入口点
#include "stdafx.h"
#include "Land.h"
#include "LandDlg.h"

BEGIN_MESSAGE_MAP(CLandApp,CWinApp)
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()

CLandApp::CLandApp()
{

}

CLandApp theApp;

BOOL CLandApp::InitInstance()
{
AfxEnableControlContainer();

#ifdef _AFXDLL
Enable3dControls();// Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic();// Call this when linking to MFC statically
#endif

CLandDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}

// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}
[解决办法]
WinMain
_tmain
main

[解决办法]
是自己写的吗,还是向导自动生成的框架?
我记得mfc中initapp之类的函数是在winmain中调用的。
不然就直接用向导自动生成框架,再往里填

读书人网 >C++

热点推荐