>> Then have a void pointer in the interface class which be casted into the library class whenever it needs to be accesses
Why do you need a void pointer? You can just forward declare the real type of the pointer in the header and then define a pointer of that type.
// HEADER
class ClassA; // This is a forward declaration and from this point on it can be used to define pointers and references
class ClassAInterface
{
ClassA * m_pClassA; // Valid
ClassA & m_rClassA; // Valid
}
>> Now the application can include the header for the interface, but that does not allow it to resovle whatever was in the library. Anyone care to comment on this?
Linking and compiling are unrelated. You still need to link to the library, the fact you are using a pimpl doesn't change this.