if I have a plugin interface that inherits from another class, how do I get plugins compiled with the interface to link (LIB) to the inherited class?

I want to have something like

class AInterface : public B
{
virtual ~AInterface() {}
}

Q_DECLARE_INTERFACE(AInterface, "blah")

which compiles fine but won't load, seems to have silent linker errors in QPluginLoader with class B.