Compiler is giving link error and require to provide definition for Base pure virtual destructor.
class Base
{
public:
virtual ~Base() = 0;
};
class Derived
Since Derived
inherits Base
, destroying a Derived
object will first call Derived::~Derived
and then Base::~Base
(the compiler does this for you - whether you like it or not).
Hence, you have to provide an implementation for Base::~Base
. Note that this isn't particularly strange. A pure virtual function can have an implementation. 'pure virtual' only means that the class cannot be instantiated.