quiverteam / Engine

Modified Version of Source 2007
108 stars 29 forks source link

[Visual Studio]Fix debug build compile errors #69

Closed Spirrwell closed 4 years ago

Spirrwell commented 4 years ago

I'm currently working on fixing the debug build compiler errors on the upcoming branch for Visual Studio. This is mostly just stubbing out strdup in memoverride.cpp and a few other errors.

The debug build is obviously incredibly valuable for debugging.

Spirrwell commented 4 years ago

I've fixed all the compile/linker errors except for the ones related to _strdup.

_strdup is defined in public/tier0/memoverride.cpp here: https://github.com/quiverteam/Engine/blob/upcoming/src/public/tier0/memoverride.cpp#L1210

It results in a linker error for some projects: Error LNK2005 __strdup already defined in memoverride.obj

The linker errors seem to indicate it's coming from libucrtd.lib, but I can't find where this library is used.

I could just stub it out for debug builds for now, but I can't figure out why this linker error is happening.

The following projects do not compile in Debug mode due to _strdup: Captioncompiler Dmxedit Localization_check Vcd_sound_check FileSystem_Stdio bsppack Bspzip Dedicated