Yeah... First, (and utterly irrelevant to this section) this is my first post in the forum. I like the site, I have to say.
I'm getting a series of really strange linker errors, and I'm not sure why, because as far as I can tell, I shouldn't be getting them at all.
Anywho, here they are:
(compiling with Visual Studio.net)
DotS error LNK2019: unresolved external symbol "public: __thiscall CPoint::CPoint(struct tagSIZE)" (??0CPoint@@QAE@UtagSIZE@@@Z) referenced in function "public: virtual long __thiscall Sprite::VOnRender(double,float)" (?VOnRender@Sprite@@UAEJNM@Z)
DotS error LNK2019: unresolved external symbol "public: __thiscall CPoint::CPoint(void)" (??0CPoint@@QAE@XZ) referenced in function "public: __thiscall Sprite::Sprite(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool,unsigned int)" (??0Sprite@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_NI@Z)
DotS error LNK2019: unresolved external symbol "public: __thiscall CRandom::CRandom(void)" (??0CRandom@@QAE@XZ) referenced in function "public: __thiscall CBaseGame::CBaseGame(void)" (??0CBaseGame@@QAE@XZ)
DotS error LNK2019: unresolved external symbol "public: __thiscall CRect::CRect(int,int,int,int)" (??0CRect@@QAE@HHHH@Z) referenced in function "public: virtual class CRect const __thiscall Sprite::VGetRect(void)const " (?VGetRect@Sprite@@UBE?BVCRect@@XZ)
DotS error LNK2019: unresolved external symbol "public: __thiscall CRect::CRect(struct tagPOINT,struct tagPOINT)" (??0CRect@@QAE@UtagPOINT@@0@Z) referenced in function "public: virtual long __thiscall Sprite::VOnRender(double,float)" (?VOnRender@Sprite@@UAEJNM@Z)
DotS error LNK2019: unresolved external symbol "public: __thiscall CRect::CRect(void)" (??0CRect@@QAE@XZ) referenced in function "public: __thiscall CDotSApp::CDotSApp(void)" (??0CDotSApp@@QAE@XZ)
DotS error LNK2019: unresolved external symbol "public: bool __thiscall CZipFile::Init(unsigned short const *)" (?Init@CZipFile@@QAE_NPBG@Z) referenced in function "public: virtual bool __thiscall ResourceZipFile::VOpen(void)" (?VOpen@ResourceZipFile@@UAE_NXZ)
DotS error LNK2019: unresolved external symbol "public: bool __thiscall CZipFile::ReadFile(int,void *)" (?ReadFile@CZipFile@@QAE_NHPAX@Z) referenced in function "public: virtual int __thiscall ResourceZipFile::VGetResource(class Resource const &,char *)" (?VGetResource@ResourceZipFile@@UAEHABVResource@@PAD@Z)
DotS error LNK2019: unresolved external symbol "public: class CSize __thiscall CPoint::operator-(struct tagPOINT)const " (??GCPoint@@QBE?AVCSize@@UtagPOINT@@@Z) referenced in function "public: virtual long __thiscall Sprite::VOnRender(double,float)" (?VOnRender@Sprite@@UAEJNM@Z)
DotS error LNK2019: unresolved external symbol "public: class optional<int> __thiscall CZipFile::Find(char const *)const " (?Find@CZipFile@@QBE?AV?$optional@H@@PBD@Z) referenced in function "public: virtual int __thiscall ResourceZipFile::VGetResourceSize(class Resource const &)" (?VGetResourceSize@ResourceZipFile@@UAEHABVResource@@@Z)
DotS error LNK2019: unresolved external symbol "public: int __thiscall CZipFile::GetFileLen(int)const " (?GetFileLen@CZipFile@@QBEHH@Z) referenced in function "public: virtual int __thiscall ResourceZipFile::VGetResourceSize(class Resource const &)" (?VGetResourceSize@ResourceZipFile@@UAEHABVResource@@@Z)
DotS error LNK2019: unresolved external symbol "public: void __thiscall CRandom::Randomize(void)" (?Randomize@CRandom@@QAEXXZ) referenced in function "public: __thiscall CBaseGame::CBaseGame(void)" (??0CBaseGame@@QAE@XZ)
DotS error LNK2019: unresolved external symbol "public: void __thiscall CZipFile::End(void)" (?End@CZipFile@@QAEXXZ) referenced in function "public: virtual __thiscall CZipFile::~CZipFile(void)" (??1CZipFile@@UAE@XZ)
I have some others: a couple of accidental multiple-repeat include errors due to well, accidental
header nesting, and one other about a function
I haven't actually defined yet. Those make sense though, so no point bringing them up.
UPDATE: I've managed to fix the other errrors, however the ones above still remain.
What does confuse me is the errors above as most of them (especially CPoint and CRect) are NOT custom coding. It's actually whining about methods it tells me are perfectly valid. Seeing it's a linker error, I know that it's probably a lib. include problem...
here are my relevant project settings:
(taken from the command line dump)
/VERBOSE:LIB /OUT:"..\Obj\Debug/Dbg_DotS.exe" /VERSION:1.0.0 /INCREMENTAL /NOLOGO /LIBPATH:"C:\DarkBlade_Ent\DotS\DotS\Libs" /DEBUG /PDB:"..\Obj\Debug/Dbg_DotS.pdb" /MAP:"..\Obj\Debug/Dbg_DotS.map" /MAPINFO:EXPORTS /MAPINFO:LINES /SUBSYSTEM:WINDOWS /MACHINE:X86 dxerr9.lib dxguid.lib d3dx9.lib d3d9.lib winmm.lib DXUT.lib zlib.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib "\Program Files\Microsoft DirectX 9.0 SDK (December 2004)\Lib\x86\DxErr9.lib" "\Program Files\Microsoft DirectX 9.0 SDK (December 2004)\Lib\x86\dxguid.lib" "\Program Files\Microsoft DirectX 9.0 SDK (December 2004)\Lib\x86\d3dx9.lib" "\Program Files\Microsoft DirectX 9.0 SDK (December 2004)\Lib\x86\d3d9.lib"
and my stdafx.h is as follows:
/*****Dawn of the Shards************************************************
Project: DotS (Win32 Game App. + DirectX 9.0c)
Filename: stdafx.h
Author: Michael "HeavyBlade" Morris Company: DarkBlade Ent.
Date of Creation: 07/28/2005 Date Modified: 07/28/2005
Description: include file for standard system include files,
or project specific include files that are used frequently, but
are changed infrequently.
Design Log:
07/28/2005 - Initial setup begun for the new DotS game engine. Just
got back from trip to Italy and excited to get started.
***********************************************************************/
#ifndef _DOTS_WIN32APP_DIRECTX9C_STDAFX_H
#define _DOTS_WIN32APP_DIRECTX9C_STDAFX_H
// --Pragma for disabling irrelevant warnings:
#pragma warning( disable : 4201 ) // nonstandard extension used - nameless struct/union - triggered in code inside MMSystem.h
#pragma warning( disable : 4100 ) // unreferenced formal parameter - large number of places in unfinish versions.
// also triggered by d3dx libs.
#pragma warning( disable : 4324 ) // Triggered by d3dx libs. (dammit guys, those should be warning FREE!)
#pragma warning( disable : 4702 ) // Triggered by d3dx libs...
// --And our defines and headers.
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>
#include <windowsx.h>
#include <crtdbg.h>
// C RunTime Header Files
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
// --Our main additions:
#include <assert.h>
#include <mmsystem.h>
#include <string>
#include <list>
#include <queue>
#include <map>
#include <atltypes.h> // for CSize, CPoint and CRect - it's all inline.
// DirectX Includes
#include <dxstdafx.h>
#include <d3dx9tex.h>
// Boost specific includes:
#include <boost\config.hpp>
#include <boost\shared_ptr.hpp>
using boost::shared_ptr;
// Other includes:
#include "GameCode2\\Templates.h"
#include "CONSTANTS.h"
#include "MACROS.h"
#endif // _DOTS_WIN32APP_DIRECTX9C_STDAFX_H
(eh, who care's if it shows my name anymore.)
If I'm forgetting a much needed code flag/format, my apologies.
I've cross-checked project settings against the code Mr. Mike has graciously provided (I love your book btw, I can actually say it's something worth it's weight in gold), and I haven't found any additional inconsistencies that would cause problems (I'm not using physics or multiplayer at this point in time).
So please, if any of you out there have any idea as to why I'm recieving these errors, I'd greatly appreciate some help.
Thanks,
-HeavyBlade
I'm getting a series of really strange linker errors, and I'm not sure why, because as far as I can tell, I shouldn't be getting them at all.
Anywho, here they are:
(compiling with Visual Studio.net)
DotS error LNK2019: unresolved external symbol "public: __thiscall CPoint::CPoint(struct tagSIZE)" (??0CPoint@@QAE@UtagSIZE@@@Z) referenced in function "public: virtual long __thiscall Sprite::VOnRender(double,float)" (?VOnRender@Sprite@@UAEJNM@Z)
DotS error LNK2019: unresolved external symbol "public: __thiscall CPoint::CPoint(void)" (??0CPoint@@QAE@XZ) referenced in function "public: __thiscall Sprite::Sprite(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool,unsigned int)" (??0Sprite@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_NI@Z)
DotS error LNK2019: unresolved external symbol "public: __thiscall CRandom::CRandom(void)" (??0CRandom@@QAE@XZ) referenced in function "public: __thiscall CBaseGame::CBaseGame(void)" (??0CBaseGame@@QAE@XZ)
DotS error LNK2019: unresolved external symbol "public: __thiscall CRect::CRect(int,int,int,int)" (??0CRect@@QAE@HHHH@Z) referenced in function "public: virtual class CRect const __thiscall Sprite::VGetRect(void)const " (?VGetRect@Sprite@@UBE?BVCRect@@XZ)
DotS error LNK2019: unresolved external symbol "public: __thiscall CRect::CRect(struct tagPOINT,struct tagPOINT)" (??0CRect@@QAE@UtagPOINT@@0@Z) referenced in function "public: virtual long __thiscall Sprite::VOnRender(double,float)" (?VOnRender@Sprite@@UAEJNM@Z)
DotS error LNK2019: unresolved external symbol "public: __thiscall CRect::CRect(void)" (??0CRect@@QAE@XZ) referenced in function "public: __thiscall CDotSApp::CDotSApp(void)" (??0CDotSApp@@QAE@XZ)
DotS error LNK2019: unresolved external symbol "public: bool __thiscall CZipFile::Init(unsigned short const *)" (?Init@CZipFile@@QAE_NPBG@Z) referenced in function "public: virtual bool __thiscall ResourceZipFile::VOpen(void)" (?VOpen@ResourceZipFile@@UAE_NXZ)
DotS error LNK2019: unresolved external symbol "public: bool __thiscall CZipFile::ReadFile(int,void *)" (?ReadFile@CZipFile@@QAE_NHPAX@Z) referenced in function "public: virtual int __thiscall ResourceZipFile::VGetResource(class Resource const &,char *)" (?VGetResource@ResourceZipFile@@UAEHABVResource@@PAD@Z)
DotS error LNK2019: unresolved external symbol "public: class CSize __thiscall CPoint::operator-(struct tagPOINT)const " (??GCPoint@@QBE?AVCSize@@UtagPOINT@@@Z) referenced in function "public: virtual long __thiscall Sprite::VOnRender(double,float)" (?VOnRender@Sprite@@UAEJNM@Z)
DotS error LNK2019: unresolved external symbol "public: class optional<int> __thiscall CZipFile::Find(char const *)const " (?Find@CZipFile@@QBE?AV?$optional@H@@PBD@Z) referenced in function "public: virtual int __thiscall ResourceZipFile::VGetResourceSize(class Resource const &)" (?VGetResourceSize@ResourceZipFile@@UAEHABVResource@@@Z)
DotS error LNK2019: unresolved external symbol "public: int __thiscall CZipFile::GetFileLen(int)const " (?GetFileLen@CZipFile@@QBEHH@Z) referenced in function "public: virtual int __thiscall ResourceZipFile::VGetResourceSize(class Resource const &)" (?VGetResourceSize@ResourceZipFile@@UAEHABVResource@@@Z)
DotS error LNK2019: unresolved external symbol "public: void __thiscall CRandom::Randomize(void)" (?Randomize@CRandom@@QAEXXZ) referenced in function "public: __thiscall CBaseGame::CBaseGame(void)" (??0CBaseGame@@QAE@XZ)
DotS error LNK2019: unresolved external symbol "public: void __thiscall CZipFile::End(void)" (?End@CZipFile@@QAEXXZ) referenced in function "public: virtual __thiscall CZipFile::~CZipFile(void)" (??1CZipFile@@UAE@XZ)
I have some others: a couple of accidental multiple-repeat include errors due to well, accidental
header nesting, and one other about a function
I haven't actually defined yet. Those make sense though, so no point bringing them up.
UPDATE: I've managed to fix the other errrors, however the ones above still remain.
What does confuse me is the errors above as most of them (especially CPoint and CRect) are NOT custom coding. It's actually whining about methods it tells me are perfectly valid. Seeing it's a linker error, I know that it's probably a lib. include problem...
here are my relevant project settings:
(taken from the command line dump)
/VERBOSE:LIB /OUT:"..\Obj\Debug/Dbg_DotS.exe" /VERSION:1.0.0 /INCREMENTAL /NOLOGO /LIBPATH:"C:\DarkBlade_Ent\DotS\DotS\Libs" /DEBUG /PDB:"..\Obj\Debug/Dbg_DotS.pdb" /MAP:"..\Obj\Debug/Dbg_DotS.map" /MAPINFO:EXPORTS /MAPINFO:LINES /SUBSYSTEM:WINDOWS /MACHINE:X86 dxerr9.lib dxguid.lib d3dx9.lib d3d9.lib winmm.lib DXUT.lib zlib.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib "\Program Files\Microsoft DirectX 9.0 SDK (December 2004)\Lib\x86\DxErr9.lib" "\Program Files\Microsoft DirectX 9.0 SDK (December 2004)\Lib\x86\dxguid.lib" "\Program Files\Microsoft DirectX 9.0 SDK (December 2004)\Lib\x86\d3dx9.lib" "\Program Files\Microsoft DirectX 9.0 SDK (December 2004)\Lib\x86\d3d9.lib"
and my stdafx.h is as follows:
/*****Dawn of the Shards************************************************
Project: DotS (Win32 Game App. + DirectX 9.0c)
Filename: stdafx.h
Author: Michael "HeavyBlade" Morris Company: DarkBlade Ent.
Date of Creation: 07/28/2005 Date Modified: 07/28/2005
Description: include file for standard system include files,
or project specific include files that are used frequently, but
are changed infrequently.
Design Log:
07/28/2005 - Initial setup begun for the new DotS game engine. Just
got back from trip to Italy and excited to get started.
***********************************************************************/
#ifndef _DOTS_WIN32APP_DIRECTX9C_STDAFX_H
#define _DOTS_WIN32APP_DIRECTX9C_STDAFX_H
// --Pragma for disabling irrelevant warnings:
#pragma warning( disable : 4201 ) // nonstandard extension used - nameless struct/union - triggered in code inside MMSystem.h
#pragma warning( disable : 4100 ) // unreferenced formal parameter - large number of places in unfinish versions.
// also triggered by d3dx libs.
#pragma warning( disable : 4324 ) // Triggered by d3dx libs. (dammit guys, those should be warning FREE!)
#pragma warning( disable : 4702 ) // Triggered by d3dx libs...
// --And our defines and headers.
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>
#include <windowsx.h>
#include <crtdbg.h>
// C RunTime Header Files
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
// --Our main additions:
#include <assert.h>
#include <mmsystem.h>
#include <string>
#include <list>
#include <queue>
#include <map>
#include <atltypes.h> // for CSize, CPoint and CRect - it's all inline.
// DirectX Includes
#include <dxstdafx.h>
#include <d3dx9tex.h>
// Boost specific includes:
#include <boost\config.hpp>
#include <boost\shared_ptr.hpp>
using boost::shared_ptr;
// Other includes:
#include "GameCode2\\Templates.h"
#include "CONSTANTS.h"
#include "MACROS.h"
#endif // _DOTS_WIN32APP_DIRECTX9C_STDAFX_H
(eh, who care's if it shows my name anymore.)
If I'm forgetting a much needed code flag/format, my apologies.
I've cross-checked project settings against the code Mr. Mike has graciously provided (I love your book btw, I can actually say it's something worth it's weight in gold), and I haven't found any additional inconsistencies that would cause problems (I'm not using physics or multiplayer at this point in time).
So please, if any of you out there have any idea as to why I'm recieving these errors, I'd greatly appreciate some help.
Thanks,
-HeavyBlade
The post was edited 3 times, last by HeavyBlade ().