Solved

LINKAGE ERROR ON ADDING BUTTON IN MENU OF MDI APPLICATION

Posted on 2003-11-19
2
228 Views
Last Modified: 2013-11-20
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
Comment
Question by:manoj_sharma1911
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 50 total points
ID: 9777920
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
 

Author Comment

by:manoj_sharma1911
ID: 9778942
Hi Alex you are right. Thanks for youe comments .
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question