Multiple Inheritance Problem

Recommended Posts

I don't usually use multiple inheritance, but I thought it was necessary for this situation.
I have written a cross platform dynamic library manager that lets me load a DLL and get an object of type Interface (similar to COM) from it in just a few lines. I have a class called DynamicLibHandle that abstracts a DLL and provides functions to open it, close it and request interfaces from it.
I was including the whole of this class and its implementation into the DLL but to remove unnecessary code and reduce the size of the DLL I decided to make an abstract base class and only include the real class in the main program, and not into every DLL.
This is my base class, it provides only the functions a DLL needs access to:

The real class inherits from this, and implements ReleaseInterface(). It also inherits from MemObject (based on the Enginuity version), which implements AddRef() and Release():

class DynamicLibHandle : public MemObject, public IDynamicLibHandle

However, inside my main program I get errors. DynamicLibHandle cannot be instantiated, because AddRef() and Release() are abstract in IDynamicLibHandle.
Is there any way to solve this, so that AddRef() and Release() are implemented correctly by inheriting MemObject?
I apologise for my long and probably confusing post.