external unresolved symbol

This is a discussion on external unresolved symbol within the C++ Programming forums, part of the General Programming Boards category; Hi, Can someone explain what does this error means? Webcam error LNK2001: unresolved external symbol "protected: long __thiscall CCaptureVideo::OnGraphNotify(unsigned int,long)" ...

  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    16

    external unresolved symbol

    Hi,

    Can someone explain what does this error means?

    Webcam error LNK2001: unresolved external symbol "protected: long __thiscall CCaptureVideo::OnGraphNotify(unsigned int,long)" (?OnGraphNotify@CCaptureVideo@@IAEJIJ@Z)

    Thanks a lot in advance!

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    It usually means you haven't linked to whatever library or object that contains the function mentioned in the error. It may alternatively be that you've not provided a definition for the function in question. Read your compiler documentation on how to properly link the required library; checking out the error code should also provide useful information, too.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    7,317
    Is CCaptureVideo your code or library code?

  4. #4
    Registered User
    Join Date
    Jul 2007
    Posts
    16
    a code i am learning. It is not a library.

    **added**

    i should elaborate more.

    so i have a header file:

    Code:
    #define WM_GRAPHNOTIFY WM_USER+1
    
    class CCaptureVideo : public CWnd
    {
         protected: afx_msg HRESULT OnGraphNotify(WPARAM wp, LPARAM lp);
         DECLARE_MESSAGE_MAP()
    };
    Then in my .cpp file:

    i have the constructer, the destroyer then have:

    Code:
    BEGIN_MESSAGE_MAP(CCaptureVideo, CWnd)
         ON_MESSAGE(WM_GRAPHNOTIFY, OnGraphNotify)
    END_MESSAGE_MAP()
    so when i compile, the error mentioned in my first post occurs. if i comment the ON_MESSAGE line.. the compilation runs fine. This should help you guys explain to me more..
    Last edited by ang_ks; 07-18-2007 at 08:32 PM.

  5. #5
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    You should provide a body for the function OnGraphNotify
    that will be called on when the message WM_GRAPHNOTIFY occurs
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  6. #6
    Registered User
    Join Date
    Jul 2007
    Posts
    16
    ahh yes you are right. i did not have my function implementation codes. I just saw an example the moment you posted.

    Thanks a lot anyway.

    Cheers to all that replied.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 02:07 AM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  3. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 01:28 PM
  4. Stupid compiler errors
    By ChrisEacrett in forum C++ Programming
    Replies: 9
    Last Post: 11-30-2003, 04:44 PM
  5. debug to release modes
    By DavidP in forum Game Programming
    Replies: 5
    Last Post: 03-20-2003, 02:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21