The compiler only provides a destructor if you do not explicitly define one.

Were you defining the destructor in both Derived2.h and Derived2.cpp? Can you show in code snippets?