Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 231
  • Last Modified:

LINKAGE ERROR ON ADDING BUTTON IN MENU OF MDI APPLICATION

HI
      I AM ADDING ONE BUTTON ON MENU OPTION .

AS A EXAMPLE ABC AND GIVING ID AS 32784.
IN CHILDFRAME.CPP  FILE I AM ADDING ON_COMMAND(32784, OnABC)
AND IN CHILDFRAME.H I AM ADDING afx_msg void OnABC();

ON COMPILING THIS PROGRAM I AM GETTING FOLLOWING ONE LINKAGE ERROR

 error LNK2001: unresolved external symbol "protected: void __thiscall CChildFrame::OnABC(void)" (?OnABC@CChildFrame@@IAEXXZ)

fatal error LNK1120: 1 unresolved externals.

WHAT IS RESIGON OF THIS ERROR HOW CAN I RESOLVE IT. OR WE CAN NOT WRTE  THESE COMMAND IN CHILDFRAME CLASSES.

THANKS
MANNU


0
manoj_sharma1911
Asked:
manoj_sharma1911
1 Solution
 
AlexFMCommented:
Write implementation for this function in cpp file:

void CChildFrame::OnABC(void)
{
    // ...
}

The line
ON_COMMAND(32784, OnABC)

is not implementation, this is call to OnABC function.
0
 
manoj_sharma1911Author Commented:
Hi Alex you are right. Thanks for youe comments .
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now