Error "undefined reference to"

This is a discussion on Error "undefined reference to" within the C++ Programming forums, part of the General Programming Boards category; Hi ! I am getting the error when I try to compile the project after adding a new .cpp file ...

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

    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
    32,823
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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

    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, 09:18 PM
  2. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 12:45 PM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 03:39 PM
  4. C OpenGL Compiler Error?
    By Matt3000 in forum C Programming
    Replies: 12
    Last Post: 07-07-2006, 05:42 PM
  5. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 10:18 AM

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