Are you using cmake or qmake? If cmake, you have a file CMakeLists.txt with a line like this:
Qt Code:
  1. add_executable(game main.cpp player.cpp game.cpp)
To copy to clipboard, switch view to plain text mode 
Add "spaceship.cpp" to the list of cpp files and your problem should go away.