In my VC ++ code that used to compile, I added the X () function as follows:
In the file BaseCollection.h
class Base
{
virtual HRESULT X();
};
IN the file DerivedCollection.h
class Derived:public Base
{
HRESULT X();
}
In the file DerivedCollection.cpp
HRESULT Derived::X
{
}
Also included header files in the .cpp file. But still, I don’t understand why I get the error message:
error LNK2001: unresolved external symbol "public: virtual long __thiscall Base :: X ()" (? X @Base @@ UAEJI @Z)
I am really trying to fix this error. Can anyone help me in solving this problem. Thank you very much in advance.
source
share