各位高手,请问一下:这种连接错误是怎么回事,应该怎么改正呢?
ainFrm.obj : error LNK2001: unresolved external symbol "protected: void __thiscall CMainFrame::OnNewAddressEnter(void)" (?OnNewAddressEnter@CMainFrame@@IAEXXZ)
Release/ControlsPosition.exe : fatal error LNK1120: 1 unresolved externals
ainFrm.obj : error LNK2001: unresolved external symbol "protected: void __thiscall CMainFrame::OnNewAddressEnter(void)" (?OnNewAddressEnter@CMainFrame@@IAEXXZ)
Release/ControlsPosition.exe : fatal error LNK1120: 1 unresolved externals
==============
这个函数没有实现
上面的函数是我自己写的一个函数,自己添加的映射.如下:
protected:
//{{AFX_MSG(CMainFrame)
afx_msg void OnNewAddressEnter();
//}}AFX_MSG
---------------------------------------------------
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
//{{AFX_MSG_MAP(CMainFrame)
ON_COMMAND(IDOK, OnNewAddressEnter)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
----------------------------------------------------
void CMainFrame::OnNewAddressEnter()
{
// gets called when an item is entered manually into the edit box portion
// of the Address combo box.
// navigate to the newly selected location and also add this address to the
// list of addresses in the combo box.
CString str; m_wndAddressBar.GetEditCtrl()->GetWindowText(str);
((CControlsPositionView*)GetActiveView())->Navigate2(str, 0, NULL); COMBOBOXEXITEM item; item.mask = CBEIF_TEXT;
item.iItem = -1;
item.pszText = (LPTSTR)(LPCTSTR)str;
m_wndAddressBar.InsertItem(&item);
}