C++ Compiler Error in Cygwin: What Is It?

4 replies · 3K views · last reply
Logarythmic
Messages
277
Reaction score
0
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?
 
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.
 
The destructor is well defined. I really can't find anything wrong..
 
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.
 
I found it. I forgot to include the .cpp at the bottom. ;)