The reason it does not link when you comment that line out in the Makefile is because that is the line that does . The error is "undefined reference to 'Department::getNameabi:cxx11' and other many lines for each method call of department. How can I translate the names of the Proto-Indo-European gods and goddesses into Latin? Don't use names that contain two underscores or begin with an underscore followed by a capital letter. Linker error: undefined reference to `std::ctype