The class needs to use WXDLLIMPEXP_ADV in order for its (default, compiler-generated) dtor to be generated inside the library, otherwise this doesn't happen and linking code using this class inside a shared library fails with errors due to the dtor being undefined.