A MFC linker error

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Feb 2006
Posts: 1
Reputation: bahar is an unknown quantity at this point 
Solved Threads: 0
bahar bahar is offline Offline
Newbie Poster

A MFC linker error

 
0
  #1
Feb 19th, 2006
Hi all,

I added Redo to the MenuBar of a MFC application and added the corresponding variables and functions to the CMainFrame class. The added lines to the message map is like this:

CPP / C++ / C Code:

  1. ON_COMMAND(ID_EDIT_UNDO, OnEditUndo)
After adding these lines, a linker error occured saying
" error LNK2001: unresolved external symbol "public: void __thiscall CMainFrame::OnEditRedo(void)" (?OnEditRedo@CMainFrame@@QAEXXZ)".

Also the added variables in the CMainFrame class are :
CPP / C++ / C Code:

afx_msg void OnEditUndo();
afx_msg void OnUpdateEditUndo(CCmdUI *pCmdUI);
afx_msg void OnEditRedo();
afx_msg void OnUpdateEditRedo(CCmdUI *pCmdUI);


The implementations of the functions OnEditUndo, OnEditUpdateUndo, OnEditRedo and OnEditUpdateRedo are empty. It is like:


void CMainFrame::OnEditRedo()
{

}


What can be the reason of the linker error after the additions to the message map.

Thanks.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC