I forgotten my C++. From memory if I have virtual functions I should have a virtual destructor. So I wrote the below. However I get a linker error about B destructor (but not A).
Is the correct solution virtual ~A()=default? It seems to work but I feel like I'm missing something
$ clang++ a.cpp
/usr/bin/ld: /tmp/a-a25aa3.o: in function `B::~B()':
a.cpp:(.text._ZN1BD2Ev[_ZN1BD2Ev]+0x14): undefined reference to `A::~A()'
Source:
class A {
public:
    virtual int test()=0; 
    virtual ~A()=0;
};
class B : public A {
public:
    virtual int BTest()=0;
};
class C : public B {
public:
    int test() override { return 1; }
        int BTest() override { return 2; }
    ~C() override {}    
};
int main() {
    C c;
    c.test();
}
 
    