首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

fatal error LNK1561: 务必定义入口点

2013-09-08 
fatal error LNK1561: 必须定义入口点#include stdafx.h#include Land.h#include LandDlg.hBEGIN_ME

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中调用的。
不然就直接用向导自动生成框架,再往里填

热点排行