I have two DLLs a.dll and b.dll and in each one I have one class AClass and BClass.
I would like to have both AClass and BClass inherit and implement the same interface AbsBase which is a pure abstract class.
In each class I set up the #defines for __declspec(dllimport) and __declspect(dllexport). When I'm trying to compile I get this:
warning C4275: non dll-interface class 'AClass' used as base for dll-interface class 'AbsBase'
which basically wants me to declare AbsBase as __declspec(dllexport)
But if the compiler would have it his way, I would have to declare AbsBase to be exported from both a.dll and b.dll.
Why does the interface of a class needs to be exported?
Is there any way around it?
should I really export AbsBase from both DLLs? isn't there something inherently wrong with this? (I would need to define a new XXX_EXPORT macro..)