Talk:Compiling under VS2005

From Valve Developer Community
Revision as of 05:01, 7 February 2006 by Rof (talk | contribs)

Jump to: navigation, search

How to Compile with Visual C++ 2005 Express

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


  • MS DirectX SDK
  • MS Platform SDK

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"



#pragma warning(disable : 4996)

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

now the actual error fixes:

All projects

Many, many instances of "error C2065: 'i' : undeclared identifier". This is where there is code like:

for(int i=0; i<XXX; i++)
    //do something

for( i=0; i<YYY; i++)
    //do something else

Change the first line to:

int i;
for( i=0; i<XXX; i++)

to fix these problems.




inline char* Q_strrchr (const char *s, char c)

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

nline char* Q_strstr( const char *s1, const char *search )


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


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


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

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

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

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



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


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

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

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

Debug: client:

...\public\tier0\memoverride.cpp line 405-430

Remove "_base" from those functions. Looks then like that:

#if defined(_DEBUG) && _MSC_VER >= 1300
void __cdecl _aligned_free(
void *
void * __cdecl _aligned_malloc(
void * __cdecl _aligned_malloc_base(
size_t size,
size_t align
return _aligned_malloc(size, align);

void __cdecl _aligned_free_base(
void *memblock

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

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



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

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

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

thats as far as you get with this forumthreat

i had some errors in c_rope

fixed it with:

taking the closing "}" from ( int iRenderCache = 0; iRenderCache < nRenderCacheCount; ++iRenderCache )

behind ++m_aRenderCache[iRenderCache].m_nCacheCount;

(means from line 231 (i think) to line 252)

other thing i did is, i added "int" in front of many "i" in for()'s (whatever it's called in eng *.*)

i'm still trying to complete this so it will compile, hope i could help anyone...

greetz --Created by: Rotzi 28 Jan 2006 (GMT+1)

  • grml*...

doesn't work neither with express nor with full version... maybe i'm just stupid... --Created by: Rotzi 6 Feb 2006 (GMT+1)


I'll be getting a copy of Visual Studio 2005 (not express) in the next couple of weeks. Is there a problem compiling on it too or does anybody know yet? --AndrewNeo 07:11, 28 Jan 2006 (PST)

No, what i read is there are no Problems with normal, full Version of VS 05. --Rotzi 4 Fe 2006 (GMT+1)