Linking...
hello.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CMainFrame::classCMainFrame" (?classCMainFrame@CMainFrame@@2UCRuntimeClass@@B)
Debug/hello.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
运行时出错,不理解。
hello.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CMainFrame::classCMainFrame" (?classCMainFrame@CMainFrame@@2UCRuntimeClass@@B)
Debug/hello.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
运行时出错,不理解。
#include "hello.h"
#include "MainFrm.h"
#include "helloDoc.h"
#include "helloView.h"void CMainFrame::OnFileHello()
{
CHelloDlg dlgHello;
if(dlgHello.DoModal()==IDOK)
AfxMessageBox("OK button pressed");
else
AfxMessageBox("Cancel button pressed");
}在MainFrm.cpp中
其他用向导生成的,久加了一个对话框,和在菜单中让他弹出以对话框
少了IMPLEMENT_DYNAMIC(CMainFrame,CFrameWnd)