I am currently trying to inherit from a c++ interface defined as such:
class IWindow: public Initializable
{
public:
virtual ~IWindow(void) =0;
virtual BOOL IsVisible(void) =0;
virtual void Show(BOOL inbShow) =0;
};
This interface is defined in a separate project from the class which is trying to inherit from it. That class is defined as such:
#include "IWindow.h"
class Win32Window: public IWindow
{
HGLRC m_renderingContext;
HWND m_win32Handle;
HDC m_deviceContext;
BOOL m_bVisible;
public:
Win32Window(void);
virtual ~Win32Window(void);
virtual void Initialize(void);
virtual void Destroy(void);
virtual BOOL IsVisible(void);
virtual void Show(BOOL inbShow);
};
I am getting an external symbol issue on the publicly defined pure virtual constructor of IWindow the exact error message reads:
1>Win32Window.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall IWindow::~IWindow(void)" (??1IWindow@@UAE@XZ) referenced in function "public: virtual __thiscall Win32Window::~Win32Window(void)" (??1Win32Window@@UAE@XZ)
I cannot seem to understand why this error is occuring as far as I was aware whether or not a class is in another project should not matter as long as the file is #included into the inheriting class's header file. Can anyone explain this error to me and possibly provide a solution to this error? I eventually plan to have the class IWindow as part of a dll but until then I need to be able to compile and test this solution with the files within multiple different projects.