Compiling under VS2005: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Organizing changes into lists)
Line 2: Line 2:
{{cleanup}}
{{cleanup}}


At present, there are substantial difficulties in successfully compiling a Source mod under Visual Studio 2005. When attempting to compile, VS throws a tremendous number of warnings and errors. These difficulties are categorized below:
At present, there are substantial difficulties in successfully compiling a Source mod under Visual Studio 2005. When attempting to compile, VS throws a tremendous number of warnings and errors. These difficulties are categorized below:


== VS Express vs. VS Standard ==
== VS Express vs. VS Standard ==


At the moment, VS2005 Express does not work with the Source SDK. Valve is working to change this (from [http://msdn.microsoft.com/coding4fun/half-life/default.aspx Coding4Fun]) but no information is available as to when that change will occur.
At the moment, VS2005 Express does not work with the Source SDK. Valve is working to change this (from [http://msdn.microsoft.com/coding4fun/half-life/default.aspx Coding4Fun]) but no information is available as to when that change will occur.


To compile it without valves support, read the following step-by-step how-to. The mentioned 1-2 months are far in the past...
To compile it without valves support, read the following step-by-step how-to. The mentioned 1-2 months are far in the past...


== How to Compile with Visual Studio 2005 / Visual C++ 2005 Express ==
== Introductions ==
 
===Introductions===


So, here is a Step-by-Step how-to compile the SDK Source Code.
So, here is a Step-by-Step how-to compile the SDK Source Code.
Line 27: Line 25:
hf and plz tell me/us if it works for you, and I hope I could help you with this... [[User:Rotzi]]
hf and plz tell me/us if it works for you, and I hope I could help you with this... [[User:Rotzi]]


====List of Compile Time Errors and Warnings====
===List of Compile Time Errors and Warnings===
[http://www.priyajeet.net/web/cache/Everythingsdk.xls Errors/Warnings in Excel Spreadsheet Format]
[http://www.priyajeet.net/web/cache/Everythingsdk.xls Errors/Warnings in Excel Spreadsheet Format]
<br>All the errors and warning got from compileing the Everything_SDK.sln under Visual Studio 2005 with the latest Windows SDK and Directx SDK.
<br>All the errors and warning got from compileing the Everything_SDK.sln under Visual Studio 2005 with the latest Windows SDK and Directx SDK.
Line 33: Line 31:
Majority warnings are due to usage of "old" C++ functions.
Majority warnings are due to usage of "old" C++ functions.


====What's Working?====
===What's Working?===


Here's a list of what is tested and working:
Here's a list of what is tested and working:
Line 59: Line 57:
*not tested yet
*not tested yet


==== Requirements (other SDKs and Setup of those) ====
=== Requirements (other SDKs and Setup of those) ===


steps till being able to compile with V C++ 05 Express:
steps till being able to compile with V C++ 05 Express:
Line 79: Line 77:
"libary files" --> "...\Microsoft Platform SDK\Lib" & "...\Microsoft DirectX SDK (December 2005)\Lib\x86"
"libary files" --> "...\Microsoft Platform SDK\Lib" & "...\Microsoft DirectX SDK (December 2005)\Lib\x86"


===General===
== Project Configuration ==
 
====Downloadable Fix====
 
If you wanna skip the in-file-fixing download [http://clandooc.de/rotz/files/source/src_VS2005_Fix.zip this] fix, and unzip it in your "\src" folder. You will still have to fix the Project settings and linker, but no longer the file-fixes. This file only includes changes for Release-Compiling.
 


====Disabling Deprecated Declaration Warnings====
=== Disabling Deprecated Declaration Warnings ===


With this fix you will disable the deprecated declaration warnings, which indeed is only a warning.
With this fix you will disable the deprecated declaration warnings, which indeed is only a warning.
Line 98: Line 91:
after #pragma once (new line) to disable old, unsecure functions warning.
after #pragma once (new line) to disable old, unsecure functions warning.


 
=== wchar_t Linker errors ===
====wchar_t Linker errors====


Linker errors with wchar_t as values:
Linker errors with wchar_t as values:
Line 110: Line 102:
An alternative fix is to recompile vgui_control.lib with the option set to Yes - its found in src\vgui2\controls. So you need to back up vgui_control.lib - found in src\lib\public and recompile it with the option set to yes and then copy that to where the original one was that you backed up.
An alternative fix is to recompile vgui_control.lib with the option set to Yes - its found in src\vgui2\controls. So you need to back up vgui_control.lib - found in src\lib\public and recompile it with the option set to yes and then copy that to where the original one was that you backed up.


== Code Changes ==
=== General ===


====error C2065: 'i' : undeclared identifier====
==== error C2065: 'i' : undeclared identifier ====


For the error C2065: 'i' : undeclared identifier, there are two ways to fix this.
For the error C2065: 'i' : undeclared identifier, there are two ways to fix this.
Line 120: Line 115:
Alternatively fix would be adding the "int"-declaration into code.
Alternatively fix would be adding the "int"-declaration into code.


===Release-Compile===
=== Release-Compile configuration ===
 
==== Downloadable fix set ====


====client&hl fixes====
If you wanna skip the in-file-fixing, download [http://clandooc.de/rotz/files/source/src_VS2005_Fix.zip this] fix, and unzip it in your "\src" folder. You will still have to fix the Project settings and linker, but no longer the file-fixes. This file only includes changes for Release-Compile.
 
==== Shared fixes ====


..\public\vstdlib\strtools.h(90):
..\public\vstdlib\strtools.h(90):
Line 139: Line 138:
  char *subStr = strchr((char *)keyName, '/');
  char *subStr = strchr((char *)keyName, '/');


 
==== Client fixes (client.dll) ====
====client fixes (client.dll)====


''Linking Errors & Fixes:''
''Linking Errors & Fixes:''
Line 150: Line 148:
Added /FORCE:MULTIPLE to Linker->Command Line->Additional Options
Added /FORCE:MULTIPLE to Linker->Command Line->Additional Options


 
==== HL fixes (server.dll) ====
----
====hl fixes (server.dll)====
Where present, italics indicate code added
Where present, italics indicate code added


Line 162: Line 158:




''changing function-run to function-link (error C3867)
===== Changing function-run to function-link (error C3867) =====


..\dlls\hl2_dll\weapon_rpg.cpp
..\dlls\hl2_dll\weapon_rpg.cpp
(150)
 
  SetTouch( ''&CMissile::''MissileTouch );
* (150)  SetTouch( ''&CMissile::''MissileTouch );
(153)
* (153)  SetThink( &CMissile::IgniteThink );
  SetThink( ''&CMissile::''IgniteThink );
* (256)  SetThink( &CMissile::SeekThink );
(256)
* (311)  SetThink( &CMissile::AugerThink );
  SetThink( ''&CMissile::''SeekThink );
* (435)  SetThink( &CMissile::SeekThink );
(311)
* (881)  SetTouch( &CAPCMissile::APCMissileTouch );
  SetThink( ''&CMissile::''AugerThink );
* (916)  SetThink( &CAPCMissile::BeginSeekThink );
(435)
* (925)  SetThink( &CAPCMissile::AugerStartThink );
  SetThink( ''&CMissile::''SeekThink );
* (938)  SetThink( &CMissile::AugerThink );
(881)
* (945)  SetThink( &CAPCMissile::ExplodeThink );
  SetTouch( ''&CAPCMissile::''APCMissileTouch );
* (955)  SetThink( &CMissile::SeekThink );
(916)
* (2058) pLaserDot->SetContextThink( &CLaserDot::LaserThink, gpGlobals->curtime + 0.1f, g_pLaserDotThink );</blockquote>
  SetThink( ''&CAPCMissile::''BeginSeekThink );
(925)
  SetThink( ''&CAPCMissile::''AugerStartThink );
(938)
  SetThink( ''&CMissile::''AugerThink );
(945)
  SetThink( ''&CAPCMissile::''ExplodeThink );
(955)
  SetThink( ''&CMissile::''SeekThink );
(2058)
pLaserDot->SetContextThink( ''&CLaserDot::''LaserThink, gpGlobals->curtime + 0.1f, g_pLaserDotThink );


..\dlls\hl2_dll\weapon_physcannon.cpp
..\dlls\hl2_dll\weapon_physcannon.cpp
(2480)
* (2480) SetContextThink( &CWeaponPhysCannon::WaitForUpgradeThink, gpGlobals->curtime + 6.0f, s_pWaitForUpgradeContext );
SetContextThink( &CWeaponPhysCannon::WaitForUpgradeThink, gpGlobals->curtime + 6.0f, s_pWaitForUpgradeContext );
* (2502) SetContextThink( &CWeaponPhysCannon::WaitForUpgradeThink, gpGlobals->curtime + 0.1f, s_pWaitForUpgradeContext );
(2502)
SetContextThink( &CWeaponPhysCannon::WaitForUpgradeThink, gpGlobals->curtime + 0.1f, s_pWaitForUpgradeContext );


..\dlls\hl2_dll\weapon_crossbow.cpp(324)
..\dlls\hl2_dll\weapon_crossbow.cpp(324)
Line 204: Line 187:
..\dlls\baseentity.cpp(57): fixed error C3861: "tolower"
..\dlls\baseentity.cpp(57): fixed error C3861: "tolower"


add
  Line 57 should be ''#include "vphysics/friction.h"''. Insert ''#include <ctype.h>'' just after this line.
  #include <ctype.h>
 
after #include "vphysics/friction.h" (L 57) to the next line (so basicaly between line 57 and line 58)
 


..\dlls\TemplateEntities.cpp(298)
..\dlls\TemplateEntities.cpp(298)
Line 226: Line 205:
Added /FORCE:MULTIPLE to Linker->Command Line->Additional Options
Added /FORCE:MULTIPLE to Linker->Command Line->Additional Options


=== Debug-Compile configuration ===


----
==== Linking Errors & Fixes ====


===Debug-Compile:===
Added msvcrtd.lib and user32.lib Linker->Input->Additional Dependencies
'''client:'''
 
Added /FORCE:MULTIPLE to Linker->Command Line->Additional Options
 
==== Client ====


...\public\tier0\memoverride.cpp line 405-430 (410-435 if you added functions above (release hl))
...\public\tier0\memoverride.cpp line 405-430 (410-435 if you added functions above (release hl))
Line 249: Line 232:
     _aligned_free(memblock);
     _aligned_free(memblock);


 
==== HL ====
''Linking Errors & Fixes:''
 
Added msvcrtd.lib and user32.lib Linker->Input->Additional Dependencies
 
Added /FORCE:MULTIPLE to Linker->Command Line->Additional Options
 
--------
'''hl:'''


...\dlls\ai_behavior_follow.cpp(2090)
...\dlls\ai_behavior_follow.cpp(2090)
Line 269: Line 244:
Added /FORCE:MULTIPLE to Linker->Command Line->Additional Options
Added /FORCE:MULTIPLE to Linker->Command Line->Additional Options


===Other Fixes===
==Other Fixes==


{{note|In the end I did not need these I think...}}
{{note|In the end I did not need these I think...}}


The problem with strdup doesn't happen in debug mode since Valve overrides strdup with their own strdup func.
=== STRDUP ===
The heap error only shows itself when using the debugger in release mode.
The problem with strdup doesn't happen in debug mode since Valve overrides strdup with their own strdup func. The heap error only shows itself when using the debugger in release mode. I believe it's because strdup() in the C library that comes with 2005 express uses new() instead of malloc(). So when Valve frees the memory using free() it gives the error. Here's the fix I hope...
I believe it's because strdup() in the C library that comes with 2005 express uses new() instead of malloc().
So when Valve frees the memory using free() it gives the error. Here's the fix I hope...


..\tier1\stringpool.cpp(73)
..\tier1\stringpool.cpp(73)
Line 307: Line 280:
  #endif
  #endif


===BotPutInServer Linker Failures===
(worked for me, didn't have to do this with SP)


BotPutInServer linker failures (worked for me, didn't have to do this with SP)
Various BotPutInServer lines will fail to link in DEBUG mode. Commenting the BotPutInServer lines out works just fine. This may have some negative affect on bots. I quite frankly have not looked into that stuff at all, other than to see that it breaks the build.
 
Various BotPutInServer lines will fail to link in DEBUG mode.
Commenting the BotPutInServer lines out works just fine.
It may have some negative affect on bots.
I quite frankly have not looked into that stuff at all, other than to see that it breaks the build.


Fix:
Fix:
Line 321: Line 291:
  hl2mp_bot_temp.h and hl2mp_bot_temp.cpp can both be found in yourmod/src/dlls/hl2mp_dll folder.
  hl2mp_bot_temp.h and hl2mp_bot_temp.cpp can both be found in yourmod/src/dlls/hl2mp_dll folder.


 
=== Warnings ===
----
 
to fix some warnings:


..\public\tier0\memoverride.cpp
..\public\tier0\memoverride.cpp
Line 345: Line 312:
  comment out everything from line 298 to line 303 (these lines are these lines if you added the function *_calloc_impl (which is 4 lines long) to line 136.
  comment out everything from line 298 to line 303 (these lines are these lines if you added the function *_calloc_impl (which is 4 lines long) to line 136.


===Compiled but Errors List===
==Remaining Error List==


Here I'll add the warning not fixed yet. Though i don't always know whether it should be fixed or doesn't matter.
Here I'll add the warning not fixed yet. Though i don't always know whether it should be fixed or doesn't matter.


====SP Debug Client====
===SP Debug Client===


  ..\public\tier0\commonmacros.h(29) : warning C4005: 'ARRAYSIZE': Makro-Neudefinition
  ..\public\tier0\commonmacros.h(29) : warning C4005: 'ARRAYSIZE': Makro-Neudefinition
Line 366: Line 333:




====SP Debug hl====
===SP Debug hl===


  ..\public\tier0\memdbgon.h(83) : warning C4996: 'strcpy' (can stay like that...)
  ..\public\tier0\memdbgon.h(83) : warning C4996: 'strcpy' (can stay like that...)

Revision as of 23:00, 8 May 2006

Broom icon.png
This article or section should be converted to third person to conform to wiki standards.
Broom icon.png
This article or section needs to be cleaned up to conform to a higher standard of quality.
For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.

At present, there are substantial difficulties in successfully compiling a Source mod under Visual Studio 2005. When attempting to compile, VS throws a tremendous number of warnings and errors. These difficulties are categorized below:

VS Express vs. VS Standard

At the moment, VS2005 Express does not work with the Source SDK. Valve is working to change this (from Coding4Fun) but no information is available as to when that change will occur.

To compile it without valves support, read the following step-by-step how-to. The mentioned 1-2 months are far in the past...

Introductions

So, here is a Step-by-Step how-to compile the SDK Source Code.

First, there's a list of what has been tested and is working with this tutorial, or which is not. Separated in SP, MP, and scratch source code.

Then there are the requirements, things you need besides the Source SDK and MS Visual, and how to set them up in your VS.

Next comes the error fixing. A general, and then separated into Release and Debug building.

ErrorFixes will be stated as: file(line number)

and how the new line looks like

hf and plz tell me/us if it works for you, and I hope I could help you with this... User:Rotzi

List of Compile Time Errors and Warnings

Errors/Warnings in Excel Spreadsheet Format
All the errors and warning got from compileing the Everything_SDK.sln under Visual Studio 2005 with the latest Windows SDK and Directx SDK. Majority errors are due to scope resolutions. Majority warnings are due to usage of "old" C++ functions.

What's Working?

Here's a list of what is tested and working:

SP:

  • Release - client - VS Studio: working but not playable -
  • Release - hl - VS Studio: working but not playable -
  • Debug - client - VS Studio: working but not playable - 826 warnings
  • Debug - hl - VS Studio: working but not playable - 1148 warnings
  • Release - client - V C++ Express: working but not playable - 33 warnings
  • Release - hl - V C++ Express: working but not playable - 42 warnings
  • Debug - client - V C++ Express: not tested yet
  • Debug - hl - V C++ Express: not tested yet

MP:

  • Release - client - V C++ Express: working & playable - 33 warnings
  • Release - hl - V C++ Express: working & playable - 42 warnings
  • Release - hl - client - Visual Studio 2005 Working and Playable 0 errors; 2 warnings for hl 3 warnings for client
  • none tested yet

scratch:

  • Release - client - V C++ Express: working - 33 warnings
  • Release - hl - V C++ Express: working - 42 warnings
  • not tested yet

Requirements (other SDKs and Setup of those)

steps till being able to compile with V C++ 05 Express:

required:


setup

Tools - Options: Projects and Solutions - VC++ Directories

upper right select "executable files" and enter "...\Microsoft Platform SDK\Bin" (replace ... with your path of course)

"include files" --> "...\Microsoft Platform SDK\Include" and "...\Microsoft DirectX SDK (December 2005)\Include"

"libary files" --> "...\Microsoft Platform SDK\Lib" & "...\Microsoft DirectX SDK (December 2005)\Lib\x86"

Project Configuration

Disabling Deprecated Declaration Warnings

With this fix you will disable the deprecated declaration warnings, which indeed is only a warning.

It warns you that the used functions are old ones and there are new, more secure versions. But you just wanna compile, you don't want to edit/improve code yet, right? ;)

..\public\tier0\dbg.h

add

#pragma warning(disable : 4996)

after #pragma once (new line) to disable old, unsecure functions warning.

wchar_t Linker errors

Linker errors with wchar_t as values:

Client->;Properties->C/C++->Language
and set Treat wchar_t as Built in Type to No.

This is because the Valve library vgui_control.lib is compiled with the option - Treat wchar_t as Built in Type - set to No so they need to be the same.

An alternative fix is to recompile vgui_control.lib with the option set to Yes - its found in src\vgui2\controls. So you need to back up vgui_control.lib - found in src\lib\public and recompile it with the option set to yes and then copy that to where the original one was that you backed up.

Code Changes

General

error C2065: 'i' : undeclared identifier

For the error C2065: 'i' : undeclared identifier, there are two ways to fix this. For one after the other, rightclick client and hl, go to C/C++ -> Language and set

Force Conformance in For Loop to No.

Alternatively fix would be adding the "int"-declaration into code.

Release-Compile configuration

Downloadable fix set

If you wanna skip the in-file-fixing, download this fix, and unzip it in your "\src" folder. You will still have to fix the Project settings and linker, but no longer the file-fixes. This file only includes changes for Release-Compile.

Shared fixes

..\public\vstdlib\strtools.h(90):

inline char*	Q_strrchr (const char *s, char c)					{ return strrchr( (char *)s, c ); }

..\public\vstdlib\strtools.h(93) zu

inline char*	Q_strstr( const char *s1, const char *search )		{ return strstr( (char *)s1, search ); }

..\cl_dll\hud_bitmapnumericdisplay.cpp(159)

if( bStart || digit > 0 || pos <= pow((float)10,numSigDigits-1) )

..\game_shared\baseentity_shared.cpp(251)

char *s = strchr( (char *)szKeyName, '#' );

..\tier1\KeyValues.cpp(800)

char *subStr = strchr((char *)keyName, '/');

Client fixes (client.dll)

Linking Errors & Fixes:

Added msvcrt.lib and user32.lib to Linker->Input->Additional Dependencies (separated each with a space(" "))

Added LIBC to Linker->Input->Ignore specific library

Added /FORCE:MULTIPLE to Linker->Command Line->Additional Options

HL fixes (server.dll)

Where present, italics indicate code added

..\dlls\vguiscreen.cpp(69)

char *s = strchr( (char *)szKeyName, '#' );

..\dlls\TemplateEntities.cpp(298)

int iMax = pow((double)10, (int)(strlen(ENTITYIO_FIXUP_STRING)-1)); // -1 for the &


Changing function-run to function-link (error C3867)

..\dlls\hl2_dll\weapon_rpg.cpp

* (150)  SetTouch( &CMissile::MissileTouch );
* (153)  SetThink( &CMissile::IgniteThink );
* (256)  SetThink( &CMissile::SeekThink );
* (311)  SetThink( &CMissile::AugerThink );
* (435)  SetThink( &CMissile::SeekThink );
* (881)  SetTouch( &CAPCMissile::APCMissileTouch );
* (916)  SetThink( &CAPCMissile::BeginSeekThink );
* (925)  SetThink( &CAPCMissile::AugerStartThink );
* (938)  SetThink( &CMissile::AugerThink );
* (945)  SetThink( &CAPCMissile::ExplodeThink );
* (955)  SetThink( &CMissile::SeekThink );

* (2058) pLaserDot->SetContextThink( &CLaserDot::LaserThink, gpGlobals->curtime + 0.1f, g_pLaserDotThink );

..\dlls\hl2_dll\weapon_physcannon.cpp

* (2480) SetContextThink( &CWeaponPhysCannon::WaitForUpgradeThink, gpGlobals->curtime + 6.0f, s_pWaitForUpgradeContext );
* (2502) SetContextThink( &CWeaponPhysCannon::WaitForUpgradeThink, gpGlobals->curtime + 0.1f, s_pWaitForUpgradeContext );

..\dlls\hl2_dll\weapon_crossbow.cpp(324)

SetThink( &CBaseEntity::SUB_Remove );

..\dlls\hl2_dll\npc_BaseZombie.cpp(160) : fixed error C4430

static int s_iAngryZombies = 0;

..\dlls\baseentity.cpp(57): fixed error C3861: "tolower"

Line 57 should be #include "vphysics/friction.h". Insert #include <ctype.h> just after this line.

..\dlls\TemplateEntities.cpp(298)

int iMax = pow((long double)10, (int)(strlen(ENTITYIO_FIXUP_STRING)-1));	// -1 for the &

..\dlls\TemplateEntities.cpp(2480)

SetContextThink( &CWeaponPhysCannon::WaitForUpgradeThink, gpGlobals->curtime + 6.0f, s_pWaitForUpgradeContext );

..\dlls\vguiscreen.cpp(69)

char *s = strchr((char *s)szKeyName, '#' );


Linking Errors & Fixes:

Added user32.lib to Additional Dependencies under Linker->Input

Added /FORCE:MULTIPLE to Linker->Command Line->Additional Options

Debug-Compile configuration

Linking Errors & Fixes

Added msvcrtd.lib and user32.lib Linker->Input->Additional Dependencies

Added /FORCE:MULTIPLE to Linker->Command Line->Additional Options

Client

...\public\tier0\memoverride.cpp line 405-430 (410-435 if you added functions above (release hl))

Remove "_base" from those functions and add it to return-var. Looks then like this:

  • (406/411)
void    __cdecl _aligned_free(
  • (410/415)
void *  __cdecl _aligned_malloc(
  • (415/420)
void * __cdecl _aligned_malloc_base(
  • (420/425)
    return _aligned_malloc(size, align);
  • (423/428)
void __cdecl _aligned_free_base(
  • (427/432)
    _aligned_free(memblock);

HL

...\dlls\ai_behavior_follow.cpp(2090)

//ASSERT_INVARIANT( sizeof(FollowerListIter_t) == sizeof(AI_FollowManagerInfoHandle_t) );


Linking Errors & Fixes:

Added user32.lib to Linker->Input->Additional Dependencies

Added /FORCE:MULTIPLE to Linker->Command Line->Additional Options

Other Fixes

Note.pngNote:In the end I did not need these I think...

STRDUP

The problem with strdup doesn't happen in debug mode since Valve overrides strdup with their own strdup func. The heap error only shows itself when using the debugger in release mode. I believe it's because strdup() in the C library that comes with 2005 express uses new() instead of malloc(). So when Valve frees the memory using free() it gives the error. Here's the fix I hope...

..\tier1\stringpool.cpp(73)

CHANGE

	pszNew = strdup( pszValue );

TO

	#ifndef _debug
		pszNew = (char*) malloc(sizeof(char) * (strlen(pszValue) + 1)); // Use Valve's malloc instead of strdup
		strcpy(pszNew, pszValue);
	#else
		pszNew = strdup( pszValue ); // Use Valve's debug strdup
	#endif


..\cl_dll\c_baseflex.cpp(921)

CHANGE

	g_flexcontroller[g_numflexcontrollers++] = strdup( szName );

TO

		#ifndef _debug
			g_flexcontroller[g_numflexcontrollers] = (char*) malloc(sizeof(char) * (strlen(szName) + 1)); //Use V's malloc instead of strdup
			strcpy(g_flexcontroller[g_numflexcontrollers++], szName);
		#else
			g_flexcontroller[g_numflexcontrollers++] = strdup( szName ); //Use V's debug strdup
		#endif

BotPutInServer Linker Failures

(worked for me, didn't have to do this with SP)

Various BotPutInServer lines will fail to link in DEBUG mode. Commenting the BotPutInServer lines out works just fine. This may have some negative affect on bots. I quite frankly have not looked into that stuff at all, other than to see that it breaks the build.

Fix: A better way would be

	adding hl2mp_bot_temp.h and hl2mp_bot_temp.cpp 
	to the HL project under the Source Files->HL2MP folder.
	hl2mp_bot_temp.h and hl2mp_bot_temp.cpp can both be found in yourmod/src/dlls/hl2mp_dll folder.

Warnings

..\public\tier0\memoverride.cpp

  • (107)
__declspec(restrict) __declspec(noalias) void *malloc( size_t nSize ) 
  • (111)
__declspec(noalias) void free( void *pMem ) 
  • (116)
__declspec(restrict) __declspec(noalias) void *realloc( void *pMem, size_t nSize ) 
  • (121)
__declspec(restrict) __declspec(noalias) void *calloc( size_t nCount, size_t nElementSize )
  • add this function to line 136 (i don't get what this is for???)
void *_calloc_impl( size_t nCount, size_t nElementSize )
{
return calloc(nCount, nElementSize);
} 

comment out _heap_init() and _heap_term(), means, (i don't get what this is for???)

comment out everything from line 298 to line 303 (these lines are these lines if you added the function *_calloc_impl (which is 4 lines long) to line 136.

Remaining Error List

Here I'll add the warning not fixed yet. Though i don't always know whether it should be fixed or doesn't matter.

SP Debug Client

..\public\tier0\commonmacros.h(29) : warning C4005: 'ARRAYSIZE': Makro-Neudefinition
pathto\microsoft platform sdk\include\winnt.h(950): Siehe vorherige Definition von 'ARRAYSIZE'

..\public\tier0\memoverride.cpp(413)(418)(418) : warning C4565 (I should be able to fix that, will check that again later...)

LINK : warning LNK4075: ignoring /INCREMENTAL due to /FORCE specification.

LONG LIST of .obj files, all with warning:

warning LNK4224: /COMMENT is no longer supported; ignored.

msvcrt.lib(MSVCR80.dll) : warning LNK4006: _free already defined in "memoverride.obj"; second definition ignored

.\cl_dll___Win32_HL2_Debug/client.dll : warning LNK4088: image being generated due to /FORCE option; image may not run.


SP Debug hl

..\public\tier0\memdbgon.h(83) : warning C4996: 'strcpy' (can stay like that...)

same for 'wcscpy' and 'strtok'

+some new double-definitions (LIBCMTD.lib, ...)

+the errors of SP Debug Client (LNK4224: /COMMENT, warning C4005: 'ARRAYSIZE')

Related Articles


Template:Otherlang:en Template:Otherlang:en:de