LNK Errors

Started by
12 comments, last by Nashoc3 18 years, 7 months ago
Hey everyone, compiling Jim's code and getting LNK2005, 2019, and 2001 errors. Anyone know whats up? Im doing Win32 if that helps. Thanks.
Advertisement
What are the exact error messages you get? I.e. what symbols are unresolved, etc?
I think he might be referring to Jim Adams' code, from the book Programming RPGs in DirectX, in case anyone didn't get that.

EDIT: I'm betting on either a missed an include, that you didn't link in all the necessary libs, or have a bonked project setting. [wink]
Some more info for ya'll,

I'm using the 8.1 Libs and Includes from another thread on this board.

They are from Serious Sam because the 8.1 SDK is MIA =P




------ Build started: Project: Derek, Configuration: Debug Win32 ------Linking...NodeTree.obj : error LNK2005: "public: __thiscall cNodeTreeMesh::cNodeTreeMesh(void)" (??0cNodeTreeMesh@@QAE@XZ) already defined in Client.objNodeTree.obj : error LNK2005: "public: __thiscall cNodeTreeMesh::~cNodeTreeMesh(void)" (??1cNodeTreeMesh@@QAE@XZ) already defined in Client.objNodeTree.obj : error LNK2005: "public: int __thiscall cNodeTreeMesh::Create(class cGraphics *,class cMesh *,int,float,long)" (?Create@cNodeTreeMesh@@QAEHPAVcGraphics@@PAVcMesh@@HMJ@Z) already defined in Client.objNodeTree.obj : error LNK2005: "public: int __thiscall cNodeTreeMesh::Free(void)" (?Free@cNodeTreeMesh@@QAEHXZ) already defined in Client.objNodeTree.obj : error LNK2005: "private: void __thiscall cNodeTreeMesh::SortNode(struct cNodeTreeMesh::sNode *,float,float,float,float)" (?SortNode@cNodeTreeMesh@@AAEXPAUsNode@1@MMMM@Z) already defined in Client.objNodeTree.obj : error LNK2005: "private: int __thiscall cNodeTreeMesh::IsPolygonContained(struct cNodeTreeMesh::sPolygon *,float,float,float,float)" (?IsPolygonContained@cNodeTreeMesh@@AAEHPAUsPolygon@1@MMMM@Z) already defined in Client.objNodeTree.obj : error LNK2005: "private: unsigned long __thiscall cNodeTreeMesh::CountPolygons(float,float,float,float)" (?CountPolygons@cNodeTreeMesh@@AAEKMMMM@Z) already defined in Client.objNodeTree.obj : error LNK2005: "public: int __thiscall cNodeTreeMesh::Render(class cFrustum *,float)" (?Render@cNodeTreeMesh@@QAEHPAVcFrustum@@M@Z) already defined in Client.objNodeTree.obj : error LNK2005: "private: void __thiscall cNodeTreeMesh::AddNode(struct cNodeTreeMesh::sNode *)" (?AddNode@cNodeTreeMesh@@AAEXPAUsNode@1@@Z) already defined in Client.objNodeTree.obj : error LNK2005: "public: float __thiscall cNodeTreeMesh::GetClosestHeight(float,float,float)" (?GetClosestHeight@cNodeTreeMesh@@QAEMMMM@Z) already defined in Client.objNodeTree.obj : error LNK2005: "public: float __thiscall cNodeTreeMesh::GetHeightBelow(float,float,float)" (?GetHeightBelow@cNodeTreeMesh@@QAEMMMM@Z) already defined in Client.objNodeTree.obj : error LNK2005: "public: float __thiscall cNodeTreeMesh::GetHeightAbove(float,float,float)" (?GetHeightAbove@cNodeTreeMesh@@QAEMMMM@Z) already defined in Client.objNodeTree.obj : error LNK2005: "public: int __thiscall cNodeTreeMesh::CheckIntersect(float,float,float,float,float,float,float *)" (?CheckIntersect@cNodeTreeMesh@@QAEHMMMMMMPAM@Z) already defined in Client.objClient.obj : error LNK2019: unresolved external symbol "public: int __thiscall cVertexBuffer::Create(class cGraphics *,unsigned long,unsigned long,long)" (?Create@cVertexBuffer@@QAEHPAVcGraphics@@KKJ@Z) referenced in function "public: int __thiscall cNodeTreeMesh::Create(class cGraphics *,class cMesh *,int,float,long)" (?Create@cNodeTreeMesh@@QAEHPAVcGraphics@@PAVcMesh@@HMJ@Z)Client.obj : error LNK2019: unresolved external symbol _D3DXGetFVFVertexSize@4 referenced in function "public: int __thiscall cNodeTreeMesh::Create(class cGraphics *,class cMesh *,int,float,long)" (?Create@cNodeTreeMesh@@QAEHPAVcGraphics@@PAVcMesh@@HMJ@Z)NodeTree.obj : error LNK2019: unresolved external symbol _D3DXGetFVFVertexSize@4 referenced in function "public: int __thiscall cNodeTreeMesh::Create(class cGraphics *,class cMesh *,int,float,long)" (?Create@cNodeTreeMesh@@QAEHPAVcGraphics@@PAVcMesh@@HMJ@Z)Client.obj : error LNK2019: unresolved external symbol "public: struct sMesh * __thiscall cMesh::GetParentMesh(void)" (?GetParentMesh@cMesh@@QAEPAUsMesh@@XZ) referenced in function "public: int __thiscall cNodeTreeMesh::Create(class cGraphics *,class cMesh *,int,float,long)" (?Create@cNodeTreeMesh@@QAEHPAVcGraphics@@PAVcMesh@@HMJ@Z)NodeTree.obj : error LNK2019: unresolved external symbol "public: struct sMesh * __thiscall cMesh::GetParentMesh(void)" (?GetParentMesh@cMesh@@QAEPAUsMesh@@XZ) referenced in function "public: int __thiscall cNodeTreeMesh::Create(class cGraphics *,class cMesh *,int,float,long)" (?Create@cNodeTreeMesh@@QAEHPAVcGraphics@@PAVcMesh@@HMJ@Z)Client.obj : error LNK2019: unresolved external symbol "public: __thiscall cVertexBuffer::cVertexBuffer(void)" (??0cVertexBuffer@@QAE@XZ) referenced in function "public: __thiscall cNodeTreeMesh::sGroup::sGroup(void)" (??0sGroup@cNodeTreeMesh@@QAE@XZ)Client.obj : error LNK2019: unresolved external symbol "public: __thiscall cVertexBuffer::~cVertexBuffer(void)" (??1cVertexBuffer@@QAE@XZ) referenced in function "public: __thiscall cNodeTreeMesh::sGroup::~sGroup(void)" (??1sGroup@cNodeTreeMesh@@QAE@XZ)Client.obj : error LNK2019: unresolved external symbol "public: int __thiscall cVertexBuffer::Free(void)" (?Free@cVertexBuffer@@QAEHXZ) referenced in function "public: __thiscall cNodeTreeMesh::sGroup::~sGroup(void)" (??1sGroup@cNodeTreeMesh@@QAE@XZ)Client.obj : error LNK2019: unresolved external symbol "public: int __thiscall cVertexBuffer::Render(unsigned long,unsigned long,unsigned long)" (?Render@cVertexBuffer@@QAEHKKK@Z) referenced in function "public: int __thiscall cNodeTreeMesh::Render(class cFrustum *,float)" (?Render@cNodeTreeMesh@@QAEHPAVcFrustum@@M@Z)Client.obj : error LNK2019: unresolved external symbol "public: int __thiscall cVertexBuffer::Unlock(void)" (?Unlock@cVertexBuffer@@QAEHXZ) referenced in function "public: int __thiscall cNodeTreeMesh::Render(class cFrustum *,float)" (?Render@cNodeTreeMesh@@QAEHPAVcFrustum@@M@Z)Client.obj : error LNK2019: unresolved external symbol __imp__timeGetTime@0 referenced in function "public: int __thiscall cNodeTreeMesh::Render(class cFrustum *,float)" (?Render@cNodeTreeMesh@@QAEHPAVcFrustum@@M@Z)WinMain.obj : error LNK2001: unresolved external symbol __imp__timeGetTime@0Client.obj : error LNK2019: unresolved external symbol "public: void * __thiscall cVertexBuffer::GetPtr(void)" (?GetPtr@cVertexBuffer@@QAEPAXXZ) referenced in function "public: int __thiscall cNodeTreeMesh::Render(class cFrustum *,float)" (?Render@cNodeTreeMesh@@QAEHPAVcFrustum@@M@Z)Client.obj : error LNK2019: unresolved external symbol "public: int __thiscall cVertexBuffer::Lock(unsigned long,unsigned long)" (?Lock@cVertexBuffer@@QAEHKK@Z) referenced in function "public: int __thiscall cNodeTreeMesh::Render(class cFrustum *,float)" (?Render@cNodeTreeMesh@@QAEHPAVcFrustum@@M@Z)Client.obj : error LNK2019: unresolved external symbol "public: struct IDirect3DDevice8 * __thiscall cGraphics::GetDeviceCOM(void)" (?GetDeviceCOM@cGraphics@@QAEPAUIDirect3DDevice8@@XZ) referenced in function "public: int __thiscall cNodeTreeMesh::Render(class cFrustum *,float)" (?Render@cNodeTreeMesh@@QAEHPAVcFrustum@@M@Z)Frustum.obj : error LNK2001: unresolved external symbol "public: struct IDirect3DDevice8 * __thiscall cGraphics::GetDeviceCOM(void)" (?GetDeviceCOM@cGraphics@@QAEPAUIDirect3DDevice8@@XZ)NodeTree.obj : error LNK2001: unresolved external symbol "public: struct IDirect3DDevice8 * __thiscall cGraphics::GetDeviceCOM(void)" (?GetDeviceCOM@cGraphics@@QAEPAUIDirect3DDevice8@@XZ)Client.obj : error LNK2019: unresolved external symbol _D3DXIntersect@40 referenced in function "public: float __thiscall cNodeTreeMesh::GetHeightBelow(float,float,float)" (?GetHeightBelow@cNodeTreeMesh@@QAEMMMM@Z)NodeTree.obj : error LNK2001: unresolved external symbol _D3DXIntersect@40Client.obj : error LNK2019: unresolved external symbol _D3DXVec3Normalize@8 referenced in function "public: int __thiscall cNodeTreeMesh::CheckIntersect(float,float,float,float,float,float,float *)" (?CheckIntersect@cNodeTreeMesh@@QAEHMMMMMMPAM@Z)NodeTree.obj : error LNK2001: unresolved external symbol _D3DXVec3Normalize@8Frustum.obj : error LNK2019: unresolved external symbol _D3DXPlaneNormalize@8 referenced in function "public: int __thiscall cFrustum::Construct(class cGraphics *,float)" (?Construct@cFrustum@@QAEHPAVcGraphics@@M@Z)Frustum.obj : error LNK2019: unresolved external symbol _D3DXMatrixMultiply@12 referenced in function "public: int __thiscall cFrustum::Construct(class cGraphics *,float)" (?Construct@cFrustum@@QAEHPAVcGraphics@@M@Z)WinMain.obj : error LNK2019: unresolved external symbol "public: __thiscall cMesh::~cMesh(void)" (??1cMesh@@QAE@XZ) referenced in function __unwindfunclet$??0cApp@@QAE@XZ$0WinMain.obj : error LNK2019: unresolved external symbol "public: __thiscall cInputDevice::~cInputDevice(void)" (??1cInputDevice@@QAE@XZ) referenced in function __unwindfunclet$??0cApp@@QAE@XZ$0WinMain.obj : error LNK2019: unresolved external symbol "public: __thiscall cInput::~cInput(void)" (??1cInput@@QAE@XZ) referenced in function __unwindfunclet$??0cApp@@QAE@XZ$0WinMain.obj : error LNK2019: unresolved external symbol "public: __thiscall cNetworkAdapter::~cNetworkAdapter(void)" (??1cNetworkAdapter@@QAE@XZ) referenced in function __unwindfunclet$??0cApp@@QAE@XZ$0WinMain.obj : error LNK2019: unresolved external symbol "public: __thiscall cFont::~cFont(void)" (??1cFont@@QAE@XZ) referenced in function __unwindfunclet$??0cApp@@QAE@XZ$0WinMain.obj : error LNK2019: unresolved external symbol "public: __thiscall cGraphics::~cGraphics(void)" (??1cGraphics@@QAE@XZ) referenced in function __unwindfunclet$??0cApp@@QAE@XZ$0WinMain.obj : error LNK2019: unresolved external symbol "public: __thiscall cAnimation::cAnimation(void)" (??0cAnimation@@QAE@XZ) referenced in function "public: __thiscall cApp::cApp(void)" (??0cApp@@QAE@XZ)WinMain.obj : error LNK2019: unresolved external symbol "public: __thiscall cMesh::cMesh(void)" (??0cMesh@@QAE@XZ) referenced in function "public: __thiscall cApp::cApp(void)" (??0cApp@@QAE@XZ)WinMain.obj : error LNK2019: unresolved external symbol "public: __thiscall cInputDevice::cInputDevice(void)" (??0cInputDevice@@QAE@XZ) referenced in function "public: __thiscall cApp::cApp(void)" (??0cApp@@QAE@XZ)WinMain.obj : error LNK2019: unresolved external symbol "public: __thiscall cInput::cInput(void)" (??0cInput@@QAE@XZ) referenced in function "public: __thiscall cApp::cApp(void)" (??0cApp@@QAE@XZ)WinMain.obj : error LNK2019: unresolved external symbol "public: __thiscall cNetworkAdapter::cNetworkAdapter(void)" (??0cNetworkAdapter@@QAE@XZ) referenced in function "public: __thiscall cApp::cApp(void)" (??0cApp@@QAE@XZ)WinMain.obj : error LNK2019: unresolved external symbol "public: __thiscall cFont::cFont(void)" (??0cFont@@QAE@XZ) referenced in function "public: __thiscall cApp::cApp(void)" (??0cApp@@QAE@XZ)WinMain.obj : error LNK2019: unresolved external symbol "public: __thiscall cCamera::cCamera(void)" (??0cCamera@@QAE@XZ) referenced in function "public: __thiscall cApp::cApp(void)" (??0cApp@@QAE@XZ)WinMain.obj : error LNK2019: unresolved external symbol "public: __thiscall cGraphics::cGraphics(void)" (??0cGraphics@@QAE@XZ) referenced in function "public: __thiscall cApp::cApp(void)" (??0cApp@@QAE@XZ)WinMain.obj : error LNK2019: unresolved external symbol "public: __thiscall cApplication::cApplication(void)" (??0cApplication@@QAE@XZ) referenced in function "public: __thiscall cApp::cApp(void)" (??0cApp@@QAE@XZ)WinMain.obj : error LNK2019: unresolved external symbol "public: __thiscall cNetworkClient::cNetworkClient(void)" (??0cNetworkClient@@QAE@XZ) referenced in function "public: __thiscall cClient::cClient(void)" (??0cClient@@QAE@XZ)WinMain.obj : error LNK2019: unresolved external symbol "public: __thiscall cNetworkClient::~cNetworkClient(void)" (??1cNetworkClient@@QAE@XZ) referenced in function "public: __thiscall cClient::~cClient(void)" (??1cClient@@QAE@XZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __cdecl cApplication::Error(int,char *,...)" (?Error@cApplication@@QAAHHPADZZ) referenced in function "public: virtual int __thiscall cApp::Init(void)" (?Init@cApp@@UAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cGraphics::Shutdown(void)" (?Shutdown@cGraphics@@QAEHXZ) referenced in function "public: virtual int __thiscall cApp::Shutdown(void)" (?Shutdown@cApp@@UAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cFont::Free(void)" (?Free@cFont@@QAEHXZ) referenced in function "public: virtual int __thiscall cApp::Shutdown(void)" (?Shutdown@cApp@@UAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cInput::Shutdown(void)" (?Shutdown@cInput@@QAEHXZ) referenced in function "public: virtual int __thiscall cApp::Shutdown(void)" (?Shutdown@cApp@@UAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cInputDevice::Free(void)" (?Free@cInputDevice@@QAEHXZ) referenced in function "public: virtual int __thiscall cApp::Shutdown(void)" (?Shutdown@cApp@@UAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cAnimation::Free(void)" (?Free@cAnimation@@QAEHXZ) referenced in function "public: virtual int __thiscall cApp::Shutdown(void)" (?Shutdown@cApp@@UAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cMesh::Free(void)" (?Free@cMesh@@QAEHXZ) referenced in function "public: virtual int __thiscall cApp::Shutdown(void)" (?Shutdown@cApp@@UAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cNetworkClient::Shutdown(void)" (?Shutdown@cNetworkClient@@QAEHXZ) referenced in function "public: virtual int __thiscall cApp::Shutdown(void)" (?Shutdown@cApp@@UAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cNetworkClient::Disconnect(void)" (?Disconnect@cNetworkClient@@QAEHXZ) referenced in function "public: virtual int __thiscall cApp::Shutdown(void)" (?Shutdown@cApp@@UAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cNetworkAdapter::Shutdown(void)" (?Shutdown@cNetworkAdapter@@QAEHXZ) referenced in function "public: virtual int __thiscall cApp::Shutdown(void)" (?Shutdown@cApp@@UAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: __thiscall cObject::~cObject(void)" (??1cObject@@QAE@XZ) referenced in function "public: __thiscall sPlayer::~sPlayer(void)" (??1sPlayer@@QAE@XZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cObject::Free(void)" (?Free@cObject@@QAEHXZ) referenced in function "public: __thiscall sPlayer::~sPlayer(void)" (??1sPlayer@@QAE@XZ)WinMain.obj : error LNK2019: unresolved external symbol "public: long __thiscall cInputDevice::GetXDelta(void)" (?GetXDelta@cInputDevice@@QAEJXZ) referenced in function "public: virtual int __thiscall cApp::Frame(void)" (?Frame@cApp@@UAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cInputDevice::GetButtonState(char)" (?GetButtonState@cInputDevice@@QAEHD@Z) referenced in function "public: virtual int __thiscall cApp::Frame(void)" (?Frame@cApp@@UAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cGraphics::Display(void)" (?Display@cGraphics@@QAEHXZ) referenced in function "public: virtual int __thiscall cApp::Frame(void)" (?Frame@cApp@@UAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cGraphics::EndScene(void)" (?EndScene@cGraphics@@QAEHXZ) referenced in function "public: virtual int __thiscall cApp::Frame(void)" (?Frame@cApp@@UAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cFont::Print(char *,long,long,long,long,unsigned long,unsigned long)" (?Print@cFont@@QAEHPADJJJJKK@Z) referenced in function "public: virtual int __thiscall cApp::Frame(void)" (?Frame@cApp@@UAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cGraphics::BeginScene(void)" (?BeginScene@cGraphics@@QAEHXZ) referenced in function "public: virtual int __thiscall cApp::Frame(void)" (?Frame@cApp@@UAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cGraphics::Clear(long,float)" (?Clear@cGraphics@@QAEHJM@Z) referenced in function "public: virtual int __thiscall cApp::Frame(void)" (?Frame@cApp@@UAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cInputDevice::GetKeyState(char)" (?GetKeyState@cInputDevice@@QAEHD@Z) referenced in function "public: virtual int __thiscall cApp::Frame(void)" (?Frame@cApp@@UAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cInputDevice::Read(void)" (?Read@cInputDevice@@QAEHXZ) referenced in function "public: virtual int __thiscall cApp::Frame(void)" (?Frame@cApp@@UAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cInputDevice::Acquire(int)" (?Acquire@cInputDevice@@QAEHH@Z) referenced in function "public: virtual int __thiscall cApp::Frame(void)" (?Frame@cApp@@UAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cApplication::Run(void)" (?Run@cApplication@@QAEHXZ) referenced in function _WinMain@16WinMain.obj : error LNK2019: unresolved external symbol "public: __thiscall cAnimation::~cAnimation(void)" (??1cAnimation@@QAE@XZ) referenced in function "public: __thiscall cApp::~cApp(void)" (??1cApp@@QAE@XZ)WinMain.obj : error LNK2019: unresolved external symbol "public: struct _GUID * __thiscall cNetworkAdapter::GetGUID(unsigned long)" (?GetGUID@cNetworkAdapter@@QAEPAU_GUID@@K@Z) referenced in function "int __stdcall ConnectDialogProc(struct HWND__ *,unsigned int,unsigned int,long)" (?ConnectDialogProc@@YGHPAUHWND__@@IIJ@Z)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cNetworkAdapter::GetName(unsigned long,char *)" (?GetName@cNetworkAdapter@@QAEHKPAD@Z) referenced in function "int __stdcall ConnectDialogProc(struct HWND__ *,unsigned int,unsigned int,long)" (?ConnectDialogProc@@YGHPAUHWND__@@IIJ@Z)WinMain.obj : error LNK2019: unresolved external symbol "public: long __thiscall cNetworkAdapter::GetNumAdapters(void)" (?GetNumAdapters@cNetworkAdapter@@QAEJXZ) referenced in function "int __stdcall ConnectDialogProc(struct HWND__ *,unsigned int,unsigned int,long)" (?ConnectDialogProc@@YGHPAUHWND__@@IIJ@Z)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cNetworkClient::Send(void *,unsigned long,unsigned long)" (?Send@cNetworkClient@@QAEHPAXKK@Z) referenced in function "private: int __thiscall cApp::SendNetworkMessage(void *,long)" (?SendNetworkMessage@cApp@@AAEHPAXJ@Z)WinMain.obj : error LNK2019: unresolved external symbol "public: struct HINSTANCE__ * __thiscall cApplication::GethInst(void)" (?GethInst@cApplication@@QAEPAUHINSTANCE__@@XZ) referenced in function "private: int __thiscall cApp::SelectAdapter(void)" (?SelectAdapter@cApp@@AAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cNetworkAdapter::Init(void)" (?Init@cNetworkAdapter@@QAEHXZ) referenced in function "private: int __thiscall cApp::SelectAdapter(void)" (?SelectAdapter@cApp@@AAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: struct HWND__ * __thiscall cApplication::GethWnd(void)" (?GethWnd@cApplication@@QAEPAUHWND__@@XZ) referenced in function "private: int __thiscall cApp::SelectAdapter(void)" (?SelectAdapter@cApp@@AAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cObject::Rotate(float,float,float)" (?Rotate@cObject@@QAEHMMM@Z) referenced in function "private: int __thiscall cApp::InitializeGame(void)" (?InitializeGame@cApp@@AAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cObject::AttachToObject(class cObject *,char *)" (?AttachToObject@cObject@@QAEHPAV1@PAD@Z) referenced in function "private: int __thiscall cApp::InitializeGame(void)" (?InitializeGame@cApp@@AAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cObject::Create(class cGraphics *,class cMesh *)" (?Create@cObject@@QAEHPAVcGraphics@@PAVcMesh@@@Z) referenced in function "private: int __thiscall cApp::InitializeGame(void)" (?InitializeGame@cApp@@AAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cAnimation::SetLoop(int,char *)" (?SetLoop@cAnimation@@QAEHHPAD@Z) referenced in function "private: int __thiscall cApp::InitializeGame(void)" (?InitializeGame@cApp@@AAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cAnimation::Load(char *,class cMesh *)" (?Load@cAnimation@@QAEHPADPAVcMesh@@@Z) referenced in function "private: int __thiscall cApp::InitializeGame(void)" (?InitializeGame@cApp@@AAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cMesh::Load(class cGraphics *,char *,char *)" (?Load@cMesh@@QAEHPAVcGraphics@@PAD1@Z) referenced in function "private: int __thiscall cApp::InitializeGame(void)" (?InitializeGame@cApp@@AAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cInputDevice::Create(class cInput *,short,int)" (?Create@cInputDevice@@QAEHPAVcInput@@FH@Z) referenced in function "private: int __thiscall cApp::InitializeGame(void)" (?InitializeGame@cApp@@AAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cInput::Init(struct HWND__ *,struct HINSTANCE__ *)" (?Init@cInput@@QAEHPAUHWND__@@PAUHINSTANCE__@@@Z) referenced in function "private: int __thiscall cApp::InitializeGame(void)" (?InitializeGame@cApp@@AAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cFont::Create(class cGraphics *,char *,long,int,int,int,int)" (?Create@cFont@@QAEHPAVcGraphics@@PADJHHHH@Z) referenced in function "private: int __thiscall cApp::InitializeGame(void)" (?InitializeGame@cApp@@AAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cApplication::ShowMouse(int)" (?ShowMouse@cApplication@@QAEHH@Z) referenced in function "private: int __thiscall cApp::InitializeGame(void)" (?InitializeGame@cApp@@AAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cGraphics::SetPerspective(float,float,float,float)" (?SetPerspective@cGraphics@@QAEHMMMM@Z) referenced in function "private: int __thiscall cApp::InitializeGame(void)" (?InitializeGame@cApp@@AAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cGraphics::SetMode(struct HWND__ *,int,int,long,long,char)" (?SetMode@cGraphics@@QAEHPAUHWND__@@HHJJD@Z) referenced in function "private: int __thiscall cApp::InitializeGame(void)" (?InitializeGame@cApp@@AAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cGraphics::Init(void)" (?Init@cGraphics@@QAEHXZ) referenced in function "private: int __thiscall cApp::InitializeGame(void)" (?InitializeGame@cApp@@AAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: __thiscall cObject::cObject(void)" (??0cObject@@QAE@XZ) referenced in function "public: __thiscall sPlayer::sPlayer(void)" (??0sPlayer@@QAE@XZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cNetworkClient::Connect(struct _GUID *,char *,long,char *,char *,char *)" (?Connect@cNetworkClient@@QAEHPAU_GUID@@PADJ111@Z) referenced in function "private: int __thiscall cApp::JoinGame(void)" (?JoinGame@cApp@@AAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cNetworkClient::Init(void)" (?Init@cNetworkClient@@QAEHXZ) referenced in function "private: int __thiscall cApp::JoinGame(void)" (?JoinGame@cApp@@AAEHXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cObject::SetAnimation(class cAnimation *,char *,unsigned long)" (?SetAnimation@cObject@@QAEHPAVcAnimation@@PADK@Z) referenced in function "private: void __thiscall cApp::UpdatePlayers(void)" (?UpdatePlayers@cApp@@AAEXXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cObject::Render(void)" (?Render@cObject@@QAEHXZ) referenced in function "private: void __thiscall cApp::RenderScene(void)" (?RenderScene@cApp@@AAEXXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cObject::UpdateAnimation(unsigned long,int)" (?UpdateAnimation@cObject@@QAEHKH@Z) referenced in function "private: void __thiscall cApp::RenderScene(void)" (?RenderScene@cApp@@AAEXXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cObject::Move(float,float,float)" (?Move@cObject@@QAEHMMM@Z) referenced in function "private: void __thiscall cApp::RenderScene(void)" (?RenderScene@cApp@@AAEXXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cObject::GetBounds(float *,float *,float *,float *,float *,float *,float *)" (?GetBounds@cObject@@QAEHPAM000000@Z) referenced in function "private: void __thiscall cApp::RenderScene(void)" (?RenderScene@cApp@@AAEXXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cGraphics::EnableZBuffer(int)" (?EnableZBuffer@cGraphics@@QAEHH@Z) referenced in function "private: void __thiscall cApp::RenderScene(void)" (?RenderScene@cApp@@AAEXXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cGraphics::SetCamera(class cCamera *)" (?SetCamera@cGraphics@@QAEHPAVcCamera@@@Z) referenced in function "private: void __thiscall cApp::RenderScene(void)" (?RenderScene@cApp@@AAEXXZ)WinMain.obj : error LNK2019: unresolved external symbol "public: int __thiscall cCamera::Point(float,float,float,float,float,float)" (?Point@cCamera@@QAEHMMMMMM@Z) referenced in function "private: void __thiscall cApp::RenderScene(void)" (?RenderScene@cApp@@AAEXXZ)Debug/Derek.exe : fatal error LNK1120: 88 unresolved externals


[Edited by - Coder on September 14, 2005 12:53:10 AM]
The first batch of errors are because you're defining your cNodeTreeMesh class twice - either by defining it all in the header, but not in the class declaration and not declaring the functions as inline, or by including your cpp file for some reason.
The second batch are because you don't link to d3dx9.lib or d3dx9d.lib.
The third set of errors are because the compiler can't find the functions it mentions. Because the cpp files aren't included in the project, or you're not linking to the .lib file they're in.

Most of it isn't actually DirectX related.
I've switched back to DX9 SDK and almost have the beast running =P.

I'll keep everyone updated, just wanted to say thanks to everyone whos pointed me in some sort of direction :).
Hey everyone,

I'm Using VS.NET 2003 now,


I've set up my options for DX9 sdk Includes and Library files (They have 8.1 in there).

Here are my additional dependencies:

d3d8.lib
d3dx8.lib
dsound.lib
dinput8.lib
dplayx.lib

I'm pretty sure the rest of the link errors are from missing libs? I am unsure though, I feel as if I have everything set up correctly but something must be wrong. Any ideas would be great =P

Linking...Core_Graphics.obj : error LNK2019: unresolved external symbol _DirectXFileCreate@4 referenced in function "public: int __thiscall cMesh::Load(class cGraphics *,char *,char *)" (?Load@cMesh@@QAEHPAVcGraphics@@PAD1@Z)Core_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimationKeyCore_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimationCore_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimationSetCore_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMMeshCore_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMFrameTransformMatrixCore_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMFrameCore_Graphics.obj : error LNK2001: unresolved external symbol _TID_D3DRMAnimationOptionsCore_Input.obj : error LNK2001: unresolved external symbol _IID_IDirectInput8ACore_Input.obj : error LNK2001: unresolved external symbol _GUID_SysMouseCore_Input.obj : error LNK2001: unresolved external symbol _GUID_SysKeyboardCore_Network.obj : error LNK2001: unresolved external symbol _CLSID_DP8SP_TCPIPCore_Network.obj : error LNK2001: unresolved external symbol _CLSID_DirectPlay8ClientCore_Network.obj : error LNK2001: unresolved external symbol _IID_IDirectPlay8ClientCore_Network.obj : error LNK2001: unresolved external symbol _CLSID_DirectPlay8ServerCore_Network.obj : error LNK2001: unresolved external symbol _IID_IDirectPlay8ServerCore_Network.obj : error LNK2001: unresolved external symbol _CLSID_DirectPlay8AddressCore_Network.obj : error LNK2001: unresolved external symbol _IID_IDirectPlay8AddressCore_Network.obj : error LNK2019: unresolved external symbol _inet_ntoa@4 referenced in function "public: int __thiscall cNetworkServer::GetIP(char *,unsigned long)" (?GetIP@cNetworkServer@@QAEHPADK@Z)Core_Network.obj : error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function "public: int __thiscall cNetworkServer::GetIP(char *,unsigned long)" (?GetIP@cNetworkServer@@QAEHPADK@Z)Core_Network.obj : error LNK2019: unresolved external symbol _gethostbyname@4 referenced in function "public: int __thiscall cNetworkServer::GetIP(char *,unsigned long)" (?GetIP@cNetworkServer@@QAEHPADK@Z)Core_Network.obj : error LNK2019: unresolved external symbol _gethostname@8 referenced in function "public: int __thiscall cNetworkServer::GetIP(char *,unsigned long)" (?GetIP@cNetworkServer@@QAEHPADK@Z)Core_Network.obj : error LNK2019: unresolved external symbol _WSAStartup@8 referenced in function "public: int __thiscall cNetworkServer::GetIP(char *,unsigned long)" (?GetIP@cNetworkServer@@QAEHPADK@Z)Core_Sound.obj : error LNK2001: unresolved external symbol _GUID_DirectMusicAllTypesCore_Sound.obj : error LNK2001: unresolved external symbol _CLSID_DirectMusicPerformanceCore_Sound.obj : error LNK2001: unresolved external symbol _IID_IDirectMusicPerformance8Core_Sound.obj : error LNK2001: unresolved external symbol _CLSID_DirectMusicLoaderCore_Sound.obj : error LNK2001: unresolved external symbol _IID_IDirectMusicLoader8Core_Sound.obj : error LNK2001: unresolved external symbol _GUID_PerfMasterVolumeCore_Sound.obj : error LNK2001: unresolved external symbol _IID_IDirectMusicSegment8Core_Sound.obj : error LNK2001: unresolved external symbol _CLSID_DirectMusicSegmentCore_Sound.obj : error LNK2001: unresolved external symbol _GUID_StandardMIDIFileCore_Sound.obj : error LNK2001: unresolved external symbol _GUID_ConnectToDLSCollectionCore_Sound.obj : error LNK2001: unresolved external symbol _GUID_PerfMasterTempoCore_Sound.obj : error LNK2001: unresolved external symbol _IID_IDirectMusicCollectionCore_Sound.obj : error LNK2001: unresolved external symbol _GUID_DefaultGMCollectionCore_Sound.obj : error LNK2001: unresolved external symbol _CLSID_DirectMusicCollectionWinMain.obj : error LNK2019: unresolved external symbol __imp__timeGetTime@0 referenced in function "public: virtual int __thiscall cApp::Frame(void)" (?Frame@cApp@@UAEHXZ)dinput8.lib(dilib3.obj) : error LNK2001: unresolved external symbol _GUID_POVdinput8.lib(dilib3.obj) : error LNK2001: unresolved external symbol _GUID_Sliderdinput8.lib(dilib3.obj) : error LNK2001: unresolved external symbol _GUID_RzAxisdinput8.lib(dilib3.obj) : error LNK2001: unresolved external symbol _GUID_RyAxisdinput8.lib(dilib3.obj) : error LNK2001: unresolved external symbol _GUID_RxAxisdinput8.lib(dilib3.obj) : error LNK2001: unresolved external symbol _GUID_ZAxisdinput8.lib(dilib1.obj) : error LNK2001: unresolved external symbol _GUID_ZAxisdinput8.lib(dilib3.obj) : error LNK2001: unresolved external symbol _GUID_YAxisdinput8.lib(dilib1.obj) : error LNK2001: unresolved external symbol _GUID_YAxisdinput8.lib(dilib3.obj) : error LNK2001: unresolved external symbol _GUID_XAxisdinput8.lib(dilib1.obj) : error LNK2001: unresolved external symbol _GUID_XAxisdinput8.lib(dilib2.obj) : error LNK2001: unresolved external symbol _GUID_KeyLIBCD.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartupDebug/FINALCON.exe : fatal error LNK1120: 48 unresolved externalsBuild log was saved at "file://c:\Documents and Settings\Neurocyte\My Documents\Visual Studio Projects\Finalcon\Debug\BuildLog.htm"FINALCON - 52 error(s), 37 warning(s)---------------------- Done ----------------------    Build: 0 succeeded, 1 failed, 0 skipped
If you use the Direct3D Frames/ .X files at all, you'll need another couple of libraries in there. I'll edit this post once I find out the actual lib names for ya.
Join us at: http://www.blade2k.net/piracysucks/to help stop game piracy!
True, thanks Heavy,

I've added d3dx9.lib and d3dx9d.lib which was suggested by Evil Steve, It lowered the errors down to around 47, so I'm still missing a few.
Got it built!

winmm.lib
wsock32.lib
d3dxof.lib
dxguid.lib
d3dx9.lib
d3dx9d.lib
d3d9.lib
d3dx.lib
d3d8.lib
d3dx8.lib
dsound.lib
dinput8.lib
dplayx.lib



Ran the executable and realized i dunno how to debug..lol

Unhandled exception at 0x6d9ed00c in Program.exe: 0xC0000005: Access violation writing location 0x00000000.


Then there was a little green arrow pointing to a line of code that called this:

D3DXCreateFontIndirect

The program would crash right from the start, how can i fix this?




This topic is closed to new replies.

Advertisement