Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

LINKAGE ERROR ON ADDING BUTTON IN MENU OF MDI APPLICATION

Posted on 2003-11-19
2
Medium Priority
?
230 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 200 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

670 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