我有一个程序在DEBUG时完全正确,但在RELEASE时取出现如下的错误:error LNK2001: unresolved external symbol "protected: void __thiscall CBrowserView::OnMyAddress(unsigned int)" (?OnMyAddress@CBrowserView@@IAEXI@Z)
Release/Browser.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.部分代码如下:protected:
//{{AFX_MSG(CBrowserView)
// NOTE - the ClassWizard will add and remove member functions here.
//    DO NOT EDIT what you see in these blocks of generated code !
afx_msg void OnMyAddress(UINT nID);
//}}AFX_MSG
////////////////////////////////////////////////////////////////////////////
BEGIN_MESSAGE_MAP(CBrowserView, CHtmlView)
//{{AFX_MSG_MAP(CBrowserView)
// NOTE - the ClassWizard will add and remove mapping macros here.
//    DO NOT EDIT what you see in these blocks of generated code!
ON_COMMAND_RANGE(IDC_BUTTON1,IDC_BUTTON3,OnMyAddress)
//}}AFX_MSG_MAP
// Standard printing commands ON_COMMAND(ID_FILE_PRINT, CHtmlView::OnFilePrint)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////
void CBrowserView::OnMyAddress(UINT nID)
{
switch(nID)
{
case IDC_BUTTON1:
break;
case IDC_BUTTON2:
break;
case IDC_BUTTON3:
break;
}
}