Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Strange error

  1. Dec 14, 2006 #1
    I'm trying to learn C++ and am using Cygwin. When I try to compile my program I get the message

    /cygdrive/c/DOCUME~1/Stoffe/LOKALA~1/Temp/ccQt0yU6.o:driver.cpp:(.text+0x9d6): undefined reference to `Person::~Person()´

    What is this kind of error?
  2. jcsd
  3. Dec 14, 2006 #2

    jim mcnamara

    User Avatar
    Science Advisor
    Gold Member

    It looks like you don't have a destructor for class Person. Or you are bringing in/linking in some code that is missing something. I can't tell.
  4. Dec 14, 2006 #3
    The destructor is well defined. I really can't find anything wrong..
  5. Dec 14, 2006 #4
    Post your code. You must be referencing the class "Person", before it has been declared. Or else it must be something very similar.

    Sometimes, these errors can even be caused by a missed semicolon at the end of a class declaration.
  6. Dec 14, 2006 #5
    I found it. I forgot to include the .cpp at the bottom. ;)
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Strange error
  1. A strange fortran code (Replies: 5)

  2. FORTRAN strange issue (Replies: 7)

  3. Strange response (Replies: 1)