View Single Post
  #1 (permalink)  
Old December 17th, 2008, 05:58 AM
chang82 chang82 is offline
Registered User
 
Join Date: Sep 2008
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Question Link error after adding serialize in sketcher

Before I add serialize to Element (Both .h and .cpp), My sketcher compile well.
After I add serialize in ch17 (until to page 881 in ivor 2005 book), when I compile I got this message

------ Build started: Project:
Sketcher, Configuration: Debug Win32 ------
Linking...
Elements.obj : error LNK2019: unresolved external symbol "protected: __thiscall CLine::CLine(void)" (??0CLine@@IAE@XZ) referenced in function "public: static class CObject * __stdcall CLine::CreateObject(void)" (?CreateObject@CLine@@SGPAVCObject@@XZ)
Elements.obj : error LNK2019: unresolved external symbol "protected: __thiscall CRectangle::CRectangle(void)" (??0CRectangle@@IAE@XZ) referenced in function "public: static class CObject * __stdcall CRectangle::CreateObject(void)" (?CreateObject@CRectangle@@SGPAVCObject@@XZ)
Elements.obj : error LNK2019: unresolved external symbol "protected: __thiscall CCircle::CCircle(void)" (??0CCircle@@IAE@XZ) referenced in function "public: static class CObject * __stdcall CCircle::CreateObject(void)" (?CreateObject@CCircle@@SGPAVCObject@@XZ)
Elements.obj : error LNK2019: unresolved external symbol "protected: __thiscall CCurve::CCurve(void)" (??0CCurve@@IAE@XZ) referenced in function "public: static class CObject * __stdcall CCurve::CreateObject(void)" (?CreateObject@CCurve@@SGPAVCObject@@XZ)
Elements.obj : error LNK2019: unresolved external symbol "protected: __thiscall CEllipse::CEllipse(void)" (??0CEllipse@@IAE@XZ) referenced in function "public: static class CObject * __stdcall CEllipse::CreateObject(void)" (?CreateObject@CEllipse@@SGPAVCObject@@XZ)
C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\Sketcher\Debug\Sketcher.exe : fatal error LNK1120: 5 unresolved externals
Build log was saved at "file://c:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\Sketcher\Sketcher\Debug\BuildLog.htm "
Sketcher - 6 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I am try to compare my sketcher with ivor's code (download from wrox website).But it's not differrent. I am not sure I am do something wrong. Anyone can help me please...
Thank for advance
Chang
Reply With Quote