You have a circular inclusion, so I am surprised that you got it "to compile this under Fedora without running into these errors". Remove the #include "MyVector.h" from MyVector.cpp. Remember, MyVector.cpp is not a source file. It is part of a header.