source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

Can't compile neither Server nor Client for both TF and HL2MP

Open bubblechuk opened this issue 11 months ago • 10 comments

Hi. I'm glad Source SDK updated 10 years later! I downloaded the code and generated the solution. But when building client (TF) and server (TF) I got an error:

Error C2382 '_msize_base': redefinition; different exception specifications Client (TF) C:\source-sdk-2013-master\src\public\tier0\memoverride.cpp 278

So if it is an redefinition, I was able to comment out this _msize_base redefenition and both client and server compiled successfully. But unfortunately when I run my mod_tf with the compiled client and server binaries,

I get an assertion utlbuffer.cpp on line 222 , which if ignored causes the game to crash.

bubblechuk avatar Feb 18 '25 20:02 bubblechuk

What version of Visual Studio / compiler / Windows SDK are you using? That information might help

mastercoms avatar Feb 18 '25 21:02 mastercoms

It works fine for me.

WonderlandWar avatar Feb 18 '25 21:02 WonderlandWar

You might need a newer version of the Windows SDK installed. Make sure you are using Visual Studio 2022 also.

misyltoad avatar Feb 18 '25 21:02 misyltoad

I am getting the same assertion. I am using the latest Windows SDK and Visual Studio 2022.

sheepy676 avatar Feb 18 '25 22:02 sheepy676

I use Visual Studio 2022, but I used Windows SDK 10.0 at the moment of opening the issue. I installed the latest SDK version (10.0.2600), changed SDK version for projects and compiled bothServer (TF) and Client (TF) projects without errors. But I still have this utlbuffer assert which crashes the game.

bubblechuk avatar Feb 18 '25 22:02 bubblechuk

This seems to be an issue exclusively in debug builds. Release builds function as expected (I mean obviously there's no asserts in release but they also don't exhibit the later crash that comes after the asserts)

JillCrungus avatar Feb 18 '25 22:02 JillCrungus

I compiled Release Binaries, it works like a charm (i strongly believe). Probably this problem related to Debug builds as @JillCrungus mentioned.

bubblechuk avatar Feb 18 '25 23:02 bubblechuk

@misyltoad I'm pretty sure this version of the sdk doesn't support VS2022 by default, unless it's just the multiplayer branch that actually allows it.

bloodycop6385 avatar Feb 19 '25 19:02 bloodycop6385

It supports VS2022 by default.

misyltoad avatar Feb 20 '25 03:02 misyltoad

Interesting, when I build the solutions it gave me a VS 2013 Build Tools Error

bloodycop6385 avatar Feb 21 '25 21:02 bloodycop6385

Same error. I'm using Windows 11 SDK (10.0.26100.0) and 10 (10.0.20348.0), but this error is still there. When I have a solution I will come back here

yandro899 avatar Mar 05 '25 03:03 yandro899

I FIXED IT. As they said here, you must have the latest version of Windows SDK installed. You need to make sure that your project is using this new version. To do this, go to Project > Properties in Visual Studio, then General, check that the SDK version used is the installed one and not another. You must do this on both the client and the server proyects.

You also can rebuild the project after upgrade to Windows SDK newer version.

yandro899 avatar Mar 06 '25 04:03 yandro899