各位高手,请问一下:这种连接错误是怎么回事,应该怎么改正呢?
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

解决方案 »

  1.   

    CMainFrame类中定义了OnNewAddressEnter函数,但没有函数体。
      

  2.   

    CMainFrame::OnNewAddressEnter
    ==============
    这个函数没有实现
      

  3.   

    估计是你ddl 没有添加到过程里面
      

  4.   

    谢谢各位的关注,我再补充一下你们说的问题我都检查过,也没有错误,程序只是在Release下出现上边问题,而在Debug环境下不会出现上边问题.真的找不到原因.
      上面的函数是我自己写的一个函数,自己添加的映射.如下:
       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);
    }
      

  5.   

    OnNewAddressEnter是不是定义在#ifdef DEBUG块里面了?