In general, 1 class for all your projects is much better than creating one class for each project.
In fact, I dare say that in almost any case, reusing the same code, rather than copying it. Always better
In general, static libraries are the best tool to solve the problem you are currently facing.
EDIT:
If you work in visual studio, I would solve it as follows. Create a project containing the declaration and definition of the base class. These projects must be a type of static library.
Other projects should include a directory containing the header file in dirs attachments. And the directory containing the lib file in the additional dependency directories.
source share