Raised This Month: $51 Target: $400
 12% 

Unresolved External Symbols with MSVC7


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
showdax
Senior Member
Join Date: Dec 2004
Old 12-20-2005 , 04:05   Unresolved External Symbols with MSVC7
Reply With Quote #1

I'm trying to compile my administration plugin under MSVC7, but when linking while building the Release build, it blows up with this:
Code:
KeyValues.obj : error LNK2019: unresolved external symbol __imp__DevMsg referenced in function "public: void __thiscall CKeyValuesErrorStack::ReportError(char const *)" (?ReportError@CKeyValuesErrorStack@@QAEXPBD@Z)
KeyValues.obj : error LNK2019: unresolved external symbol __imp__MemFreeScratch referenced in function "public: bool __thiscall KeyValues::LoadFromFile(class IBaseFileSystem *,char const *,char const *)" (?LoadFromFile@KeyValues@@QAE_NPAVIBaseFileSystem@@PBD1@Z)
KeyValues.obj : error LNK2019: unresolved external symbol __imp__MemAllocScratch referenced in function "public: bool __thiscall KeyValues::LoadFromFile(class IBaseFileSystem *,char const *,char const *)" (?LoadFromFile@KeyValues@@QAE_NPAVIBaseFileSystem@@PBD1@Z)
KeyValues.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl DevMsg(char const *,...)" (__imp_?DevMsg@@YAXPBDZZ) referenced in function "private: void __thiscall KeyValues::ParseIncludedKeys(char const *,char const *,class IBaseFileSystem *,char const *,class CUtlVector > &)" (?ParseIncludedKeys@KeyValues@@AAEXPBD0PAVIBaseFileSystem@@0AAV?$CUtlVector@PAVKeyValues@@V?$CUtlMemory@PAVKeyValues@@@@@@@Z)
mathlib.obj : error LNK2019: unresolved external symbol __imp__GetCPUInformation referenced in function "void __cdecl MathLib_Init(float,float,float,int,bool,bool,bool,bool)" (?MathLib_Init@@YAXMMMH_N000@Z)
And with Debug, it's even worse:
Code:
cvars.obj : error LNK2019: unresolved external symbol __imp___Q_strcmp referenced in function "void __cdecl g_VersionCallback(class ConVar *,char const *)" (?g_VersionCallback@@YAXPAVConVar@@PBD@Z)
CServerPluginAdmin.obj : error LNK2001: unresolved external symbol __imp___Q_strcmp
CAdminTools.obj : error LNK2001: unresolved external symbol __imp___Q_strcmp
cvars.obj : error LNK2019: unresolved external symbol __imp__Q_atoi referenced in function "bool __cdecl Q_atob(char const *,bool &)" (?Q_atob@@YA_NPBDAA_N@Z)
CAdminTools.obj : error LNK2001: unresolved external symbol __imp__Q_atoi
cvars.obj : error LNK2019: unresolved external symbol __imp__Q_strnicmp referenced in function "bool __cdecl Q_atob(char const *,bool &)" (?Q_atob@@YA_NPBDAA_N@Z)
CAdminTools.obj : error LNK2001: unresolved external symbol __imp__Q_strnicmp
cvars.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) char const * __cdecl Q_stristr(char const *,char const *)" (__imp_?Q_stristr@@YAPBDPBD0@Z) referenced in function "void __cdecl admin_exec(void)" (?admin_exec@@YAXXZ)
CAdminTools.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) char const * __cdecl Q_stristr(char const *,char const *)" (__imp_?Q_stristr@@YAPBDPBD0@Z)
cvars.obj : error LNK2019: unresolved external symbol __imp___Q_strlen referenced in function "void __cdecl admin_exec(void)" (?admin_exec@@YAXXZ)
convar.obj : error LNK2001: unresolved external symbol __imp___Q_strlen
KeyValues.obj : error LNK2001: unresolved external symbol __imp___Q_strlen
CAdminTools.obj : error LNK2001: unresolved external symbol __imp___Q_strlen
cvars.obj : error LNK2019: unresolved external symbol __imp__Q_atof referenced in function "void __cdecl admin_teleport(void)" (?admin_teleport@@YAXXZ)
CServerPluginAdmin.obj : error LNK2019: unresolved external symbol __imp___Q_stricmp referenced in function "class ConCommand * __cdecl CServerPluginAdmin_FindCommand(char const *)" (?CServerPluginAdmin_FindCommand@@YAPAVConCommand@@PBD@Z)
KeyValues.obj : error LNK2001: unresolved external symbol __imp___Q_stricmp
CAdminTools.obj : error LNK2001: unresolved external symbol __imp___Q_stricmp
CServerPluginAdmin.obj : error LNK2019: unresolved external symbol __imp__Q_snprintf referenced in function "public: virtual bool __thiscall CServerPluginAdmin::Load(int,class ISmmAPI *,char *,unsigned int,bool)" (?Load@CServerPluginAdmin@@UAE_NHPAVISmmAPI@@PADI_N@Z)
convar.obj : error LNK2001: unresolved external symbol __imp__Q_snprintf
KeyValues.obj : error LNK2001: unresolved external symbol __imp__Q_snprintf
CAdminTools.obj : error LNK2019: unresolved external symbol __imp__Q_snprintf referenced in function "public: virtual bool __thiscall CAdminTools::url(class CUtlVector > *,char const *,char const *,bool)const " (?url@CAdminTools@@UBE_NPAV?$CUtlVector@PAUedict_t@@V?$CUtlMemory@PAUedict_t@@@@@@PBD1_N@Z)
CServerPluginAdmin.obj : error LNK2019: unresolved external symbol __imp___Q_strcpy referenced in function "public: virtual bool __thiscall CServerPluginAdmin::Load(int,class ISmmAPI *,char *,unsigned int,bool)" (?Load@CServerPluginAdmin@@UAE_NHPAVISmmAPI@@PADI_N@Z)
convar.obj : error LNK2019: unresolved external symbol __imp__Q_strcasecmp referenced in function "public: static void __cdecl ConCommandBase::RevertFlaggedCvars(int)" (?RevertFlaggedCvars@ConCommandBase@@SAXH@Z)
convar.obj : error LNK2019: unresolved external symbol __imp__Q_strncpy referenced in function "protected: char * __thiscall ConCommandBase::CopyString(char const *)" (?CopyString@ConCommandBase@@IAEPADPBD@Z)
KeyValues.obj : error LNK2019: unresolved external symbol __imp__Q_strncpy referenced in function "public: bool __thiscall KeyValues::LoadFromFile(class IBaseFileSystem *,char const *,char const *)" (?LoadFromFile@KeyValues@@QAE_NPAVIBaseFileSystem@@PBD1@Z)
CAdminTools.obj : error LNK2019: unresolved external symbol __imp__Q_strncpy referenced in function "public: virtual bool __thiscall CAdminTools::kick(struct edict_t *,char const *)const " (?kick@CAdminTools@@UBE_NPAUedict_t@@PBD@Z)
KeyValues.obj : error LNK2019: unresolved external symbol __imp__KeyValuesSystem referenced in function "public: char const * __thiscall KeyValues::GetName(void)const " (?GetName@KeyValues@@QBEPBDXZ)
KeyValues.obj : error LNK2019: unresolved external symbol __imp___Q_memcpy referenced in function "public: class KeyValues * __thiscall KeyValues::FindKey(char const *,bool)" (?FindKey@KeyValues@@QAEPAV1@PBD_N@Z)
KeyValues.obj : error LNK2019: unresolved external symbol __imp__Q_strncat referenced in function "private: void __thiscall KeyValues::ParseIncludedKeys(char const *,char const *,class IBaseFileSystem *,char const *,class CUtlVector > &)" (?ParseIncludedKeys@KeyValues@@AAEXPBD0PAVIBaseFileSystem@@0AAV?$CUtlVector@PAVKeyValues@@V?$CUtlMemory@PAVKeyValues@@@@@@@Z)
KeyValues.obj : error LNK2019: unresolved external symbol __imp___Q_memmove referenced in function "protected: void __thiscall CUtlVector >::ShiftElementsRight(int,int)" (?ShiftElementsRight@?$CUtlVector@PAVKeyValues@@V?$CUtlMemory@PAVKeyValues@@@@@@IAEXHH@Z)
CAdminTools.obj : error LNK2001: unresolved external symbol __imp___Q_memmove
utlbuffer.obj : error LNK2019: unresolved external symbol __imp__Q_vsnprintf referenced in function "public: void __thiscall CUtlBuffer::VaPrintf(char const *,char *)" (?VaPrintf@CUtlBuffer@@QAEXPBDPAD@Z)
CAdminTools.obj : error LNK2019: unresolved external symbol __imp__Q_strncmp referenced in function "public: virtual bool __thiscall CAdminTools::findPlayers(class CUtlVector > *,char const *,bool)const " (?findPlayers@CAdminTools@@UBE_NPAV?$CUtlVector@PAUedict_t@@V?$CUtlMemory@PAUedict_t@@@@@@PBD_N@Z)
CAdminTools.obj : error LNK2019: unresolved external symbol __imp__RandomFloat referenced in function "public: virtual bool __thiscall CAdminTools::slap(struct edict_t *,int)const " (?slap@CAdminTools@@UBE_NPAUedict_t@@H@Z)
What am I doing wrong? Those all seem to be part of tier0/vstdlib, which is in my library path, and it didn't even get this far without them in the path, so I don't think that's the problem.
showdax is offline
Send a message via MSN to showdax
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 12-20-2005 , 10:27  
Reply With Quote #2

Include KeyValues.cpp from the hl2sdk into your project.
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
showdax
Senior Member
Join Date: Dec 2004
Old 12-20-2005 , 10:42  
Reply With Quote #3

It's already there, I'm not that absentminded. It's having problems linking with KeyValues.obj, which wouldn't even exist if I didn't compile it.
showdax is offline
Send a message via MSN to showdax
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 12-20-2005 , 11:01  
Reply With Quote #4

The debug one seems to not be linking with tier0.lib and vstblib.lib.

As for the first one, im unsure where DevMsg is located, as when I try and locate it in my project it cant find the declaration, yet it compiles fine, so im guessing its a stub function ?

You could change all the DevMsg lines to Msg ?
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
showdax
Senior Member
Join Date: Dec 2004
Old 12-20-2005 , 11:43  
Reply With Quote #5

Both binaries are in the library path for both Debug and Release. Removing the DevMsg() call wouldn't fix the calls to MemFreeScratch, MemAllocScratch and GetCPUInformation. I don't think removing the latter three would be a good idea.
showdax is offline
Send a message via MSN to showdax
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 12-20-2005 , 12:04  
Reply With Quote #6

I dont mean their missing, i mean in ur MSVC project settings, they are not in the input section for the linker.
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
showdax
Senior Member
Join Date: Dec 2004
Old 12-20-2005 , 12:22  
Reply With Quote #7

Quote:
Originally Posted by c0ldfyr3
I dont mean their missing, i mean in ur MSVC project settings, they are not in the input section for the linker.
Oh okay, it builds now. That wasn't very intuitive though. And just adding it to the library path worked just fine for my previous plugin!
showdax is offline
Send a message via MSN to showdax
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 12-20-2005 , 13:29  
Reply With Quote #8

Quote:
Originally Posted by showdax
Quote:
Originally Posted by c0ldfyr3
I dont mean their missing, i mean in ur MSVC project settings, they are not in the input section for the linker.
Oh okay, it builds now. That wasn't very intuitive though. And just adding it to the library path worked just fine for my previous plugin!
?
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode