Thread: Error "undefined reference to"

  1. #1
    Registered User
    Join Date
    Jan 2007
    Posts
    113

    Error "undefined reference to"

    Hi !

    I am getting the error when I try to compile the project after adding a new .cpp file

    and .h header file........

    I have add these files in say ABC folder and made entry in makefile.am.......

    But when I compile project it give error as follow :

    Code:
    ../src/.libs/libProject.so: undefined reference to `ABC::ABC()'
    ../src/.libs/libProject.so: undefined reference to `ABC::GetFileName(QString)'

    The constructor of this class and function are called from file XYZ.cpp in folder

    MAP.......

    I have include ABC.h in XYZ.cpp and when compile gives above error.......

    Help me......

    Bargi

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    So where does ABC.cpp get compiled?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Jan 2007
    Posts
    113

    Problem solved

    Hi !

    My problem was solved...............

    Thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 11:45 AM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  4. C OpenGL Compiler Error?
    By Matt3000 in forum C Programming
    Replies: 12
    Last Post: 07-07-2006, 04:42 PM
  5. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 10:18 AM