Solved Source SDK linking error

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

squeenie

Hacker
Meme Tier VIP
Dank Tier Donator
Mar 6, 2013
677
5,478
37
I've hooked the function IGameEventManager2::FireEvent and I want to read the event parameter but I'm getting a link error that I don't know how to fix.

Error 121 error LNK2001: unresolved external symbol "private: static char const * (__cdecl* KeyValues::s_pfGetStringForSymbol)(int)" (?s_pfGetStringForSymbol@KeyValues@@0P6APBDH@ZA)

heres the definition in the header file:

private:
// Statics to implement the optional growable string table
// Function pointers that will determine which mode we are in
static int (*s_pfGetSymbolForString)( const char *name, bool bCreate );
static const char *(*s_pfGetStringForSymbol)( int symbol );
static CKeyValuesGrowableStringTable *s_pGrowableStringTable;

and here is the function

const char *KeyValues::GetName( void ) const
{
return s_pfGetStringForSymbol( m_iKeyName );
}

Is there a .lib I should be including that I haven't?
 

squeenie

Hacker
Meme Tier VIP
Dank Tier Donator
Mar 6, 2013
677
5,478
37
Got it fixed. Was hooking the wrong vtable index. It is at 11 if anyone wants to know.
 

brinkz

Coder
Meme Tier VIP
Sep 3, 2012
209
1,688
12
I'm not having this in my SDK, also the function looks like this for me:
C++:
const char *KeyValues::GetName( void ) const
{
	return KeyValuesSystem()->GetStringForSymbol(m_iKeyName);
}
 

squeenie

Hacker
Meme Tier VIP
Dank Tier Donator
Mar 6, 2013
677
5,478
37
I'm not having this in my SDK, also the function looks like this for me:
C++:
const char *KeyValues::GetName( void ) const
{
	return KeyValuesSystem()->GetStringForSymbol(m_iKeyName);
}
I'm using the 2013 SDK
Changing it to that makes it compile but it crashes when called
 

squeenie

Hacker
Meme Tier VIP
Dank Tier Donator
Mar 6, 2013
677
5,478
37
Tried linking to tier1.lib?
Yeah but I get a lot of errors like this
1>LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
 

brinkz

Coder
Meme Tier VIP
Sep 3, 2012
209
1,688
12
Sure you are using the right one? I'm having no problem with linking to tier1.lib.
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods