You don't link cpp files, you link object files, and it's not necessary to have a header file to link files.
What compiler are you using and what OS?