unresolved external symbol "protected: virtual struct AFX_MSGMAP const * __thiscall

VC6的MFC基本对话框程序,写了一般在优化是出错了..

查了好久的资料,才找到的、错误提示如下:

--------------------Configuration: McSpider - Win32 Release--------------------
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
McSpider.cpp
McSpiderDlg.cpp
Generating Code...
Linking...
McSpiderDlg.obj : error LNK2001: unresolved external symbol "protected: virtual struct AFX_MSGMAP const * __thiscall CSafeGuardDlg::GetMessageMap(void)const " ()
Release/McSpider.exe :fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.

McSpider.exe - 1error(s), 0 warning(s)

 

错误与解决方案:在MFC类中删除掉某个类后在不需要用消息映射宏(即 DECLARE_MESSAGE_MAP() )时,把它删除干净

本人用这种方法已解决此错误,即如果类中没有用到消息映射宏,则把 DECLARE_MESSAGE_MAP()这句删掉!

你可能感兴趣的:(unresolved external symbol "protected: virtual struct AFX_MSGMAP const * __thiscall)