You haven't linked in the object file that implements your "Spaceship" class code, probably because it isn't being compiled because you haven't included the .cpp file in your project's list of source files. The project compiles because you have included the .h file that defines the Spaceship class and its methods, but your problem is a linker error, which takes place after compilation is done.