MSVC++.Net Compile Error

  • Thread starter Thread starter superlou
  • Start date Start date
S

superlou

Guest
Hi,
I was wondering if anyone could help me clear up the following linker errors:

hl error LNK2019: unresolved external symbol "class CBasePlayer * __cdecl BotPutInServer(bool,int)" (?BotPutInServer@@YAPAVCBasePlayer@@_NH@Z) referenced in function "void __cdecl Bot_f(void)" (?Bot_f@@YAXXZ)

hl error LNK2019: unresolved external symbol "void __cdecl Bot_RunAll(void)" (?Bot_RunAll@@YAXXZ) referenced in function "void __cdecl GameStartFrame(void)" (?GameStartFrame@@YAXXZ)


I had many more, but I reinstalled and that fixed them. I have tried uninstalling and reinstalling and remaking the mod with the mod wizard a couple of times and still recieve them when i try to compile game_sdk.sln.

I'm hoping I just need an include or compile setting and that things are not completely broken.

Thanks,
Louis
 
Around line 833 of hl2mp_gamerules.cpp, there's a function called Bot_f. Comment the whole of it out. Also, in hl2mp_client.cpp, comment out around line 189, where it calls Bot_Runall.

That should fix it. Or just change from debug build to release build, which comments the lines out for you.

-Angry Lawyer
 
Yeah, I noticed that if i did a release build it compiled nicely (took forever though :) ). I will try that when I get out of work. Is there something that I am missing that is causing this?
 
The code I pointed out is enclosed in "#ifdef DEBUG" things. I.e, they only appear - and only cause errors - in the debug build.

Release build is better, in an inexplicable way. Once you compile in Release once, it'll be quick for all subsequent compiles.

-Angry Lawyer
 
Back
Top