Talk:Compiling under VS2005: Difference between revisions
(How to compile using Visual C++ 2005 Express) |
|||
Line 3: | Line 3: | ||
steps till being able to compile with V C++ 05 Express: | steps till being able to compile with V C++ 05 Express: | ||
required: | required: | ||
MS DirectX SDK | |||
MS Platform SDK | *MS DirectX SDK | ||
*MS Platform SDK | |||
Tools - Options: Projects and Solutions - VC++ Directories | Tools - Options: Projects and Solutions - VC++ Directories | ||
upper right select "executable files" and enter "...\Microsoft Platform SDK\Bin" (replace ... with your path of course) | 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" | "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" | "libary files" --> "...\Microsoft Platform SDK\Lib" & "...\Microsoft DirectX SDK (December 2005)\Lib\x86" | ||
dbg.h | dbg.h | ||
add | add | ||
#pragma warning(disable : 4996) | #pragma warning(disable : 4996) | ||
after #pragma once (new line) to disable old, unsecure functions warning. | after #pragma once (new line) to disable old, unsecure functions warning. | ||
now the actual error fixes: | now the actual error fixes: | ||
'''Release:''' | '''Release:''' | ||
'''client:''' | '''client:''' | ||
..\public\vstdlib\strtools.h(90): | ..\public\vstdlib\strtools.h(90): | ||
inline char* Q_strrchr (const char *s, char c) | inline char* Q_strrchr (const char *s, char c) | ||
..\public\vstdlib\strtools.h(93) zu | ..\public\vstdlib\strtools.h(93) zu | ||
nline char* Q_strstr( const char *s1, const char *search ) | nline char* Q_strstr( const char *s1, const char *search ) | ||
hud_bitmapnumericdisplay.cpp(159) | hud_bitmapnumericdisplay.cpp(159) | ||
if( bStart || digit > 0 || pos <= pow((float)10,numSigDigits-1) ) | if( bStart || digit > 0 || pos <= pow((float)10,numSigDigits-1) ) | ||
..\game_shared\baseentity_shared.cpp(245) | ..\game_shared\baseentity_shared.cpp(245) | ||
char *s = strchr( (char *)szKeyName, '#' ); | char *s = strchr( (char *)szKeyName, '#' ); | ||
..\tier1\KeyValues.cpp(800) | ..\tier1\KeyValues.cpp(800) | ||
char *subStr = strchr((char *)keyName, '/'); | char *subStr = strchr((char *)keyName, '/'); | ||
Added msvcrt.lib and user32.lib to Linker->Input->Additional Dependencies | Added msvcrt.lib and user32.lib to Linker->Input->Additional Dependencies | ||
Added LIBC to Linker->Input->Ignore specific library | Added LIBC to Linker->Input->Ignore specific library | ||
Added /FORCE:MULTIPLE to Linker->Command Line->Additional Options | Added /FORCE:MULTIPLE to Linker->Command Line->Additional Options | ||
----------- | ----------- | ||
Line 47: | Line 60: | ||
vguiscreen.cpp(69) | vguiscreen.cpp(69) | ||
char *s = strchr( (char *)szKeyName, '#' ); | char *s = strchr( (char *)szKeyName, '#' ); | ||
TemplateEntities.cpp(298) | TemplateEntities.cpp(298) | ||
int iMax = pow((double)10, (int)(strlen(ENTITYIO_FIXUP_STRING)-1)); // -1 for the & | int iMax = pow((double)10, (int)(strlen(ENTITYIO_FIXUP_STRING)-1)); // -1 for the & | ||
Added user32.lib to Additional Dependencies under Linker->Input | Added user32.lib to Additional Dependencies under Linker->Input | ||
Added /FORCE:MULTIPLE to Linker->Command Line->Additional Options | Added /FORCE:MULTIPLE to Linker->Command Line->Additional Options | ||
Line 61: | Line 75: | ||
...\public\tier0\memoverride.cpp line 405-430 | ...\public\tier0\memoverride.cpp line 405-430 | ||
Remove "_base" from those functions. Looks then like that: | Remove "_base" from those functions. Looks then like that: | ||
void __cdecl _aligned_free_base( | #if defined(_DEBUG) && _MSC_VER >= 1300 | ||
void *memblock | void __cdecl _aligned_free( | ||
) | void * | ||
{ | ); | ||
_aligned_free(memblock); | void * __cdecl _aligned_malloc( | ||
} | size_t, | ||
#endif[/quote] | size_t | ||
); | |||
void * __cdecl _aligned_malloc_base( | |||
size_t size, | |||
size_t align | |||
) | |||
{ | |||
return _aligned_malloc(size, align); | |||
} | |||
void __cdecl _aligned_free_base( | |||
void *memblock | |||
) | |||
{ | |||
_aligned_free(memblock); | |||
} | |||
#endif[/quote] | |||
Added msvcrtd.lib and user32.lib Linker->Input->Additional Dependencies | Added msvcrtd.lib and user32.lib Linker->Input->Additional Dependencies | ||
Added /FORCE:MULTIPLE to Linker->Command Line->Additional Options | Added /FORCE:MULTIPLE to Linker->Command Line->Additional Options | ||
Line 94: | Line 111: | ||
...\dlls\ai_behavior_follow.cpp(2090) | ...\dlls\ai_behavior_follow.cpp(2090) | ||
#ASSERT_INVARIANT( sizeof(FollowerListIter_t) == sizeof(AI_FollowManagerInfoHandle_t) ); | #ASSERT_INVARIANT( sizeof(FollowerListIter_t) == sizeof(AI_FollowManagerInfoHandle_t) ); | ||
Added user32.lib to Linker->Input->Additional Dependencies | Added user32.lib to Linker->Input->Additional Dependencies | ||
Added /FORCE:MULTIPLE to Linker->Command Line->Additional Options | Added /FORCE:MULTIPLE to Linker->Command Line->Additional Options | ||
Line 103: | Line 121: | ||
thats as far as you get with [http://www.chatbear.com/board.plm?a=viewthread&t=104,1102070328,6443&b=4991&id=949052&v=flatold&s=0 this forumthreat] | thats as far as you get with [http://www.chatbear.com/board.plm?a=viewthread&t=104,1102070328,6443&b=4991&id=949052&v=flatold&s=0 this forumthreat] | ||
i had some errors in c_rope | i had some errors in c_rope | ||
fixed it with: | fixed it with: | ||
taking the closing "}" from ''( int iRenderCache = 0; iRenderCache < nRenderCacheCount; ++iRenderCache )'' | taking the closing "}" from ''( int iRenderCache = 0; iRenderCache < nRenderCacheCount; ++iRenderCache )'' | ||
behind ''++m_aRenderCache[iRenderCache].m_nCacheCount;'' | behind ''++m_aRenderCache[iRenderCache].m_nCacheCount;'' | ||
(means from line 231 (i think) to line 252) | (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 *.*) | 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... | i'm still trying to complete this so it will compile, hope i could help anyone... | ||
greetz Rotz | greetz Rotz |
Revision as of 07:25, 28 January 2006
How to Compile with Visual C++ 2005 Express
steps till being able to compile with V C++ 05 Express:
required:
- 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"
dbg.h
add
#pragma warning(disable : 4996)
after #pragma once (new line) to disable old, unsecure functions warning.
now the actual error fixes:
Release:
client:
..\public\vstdlib\strtools.h(90):
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 )
hud_bitmapnumericdisplay.cpp(159)
if( bStart || digit > 0 || pos <= pow((float)10,numSigDigits-1) )
..\game_shared\baseentity_shared.cpp(245)
char *s = strchr( (char *)szKeyName, '#' );
..\tier1\KeyValues.cpp(800)
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
hl:
vguiscreen.cpp(69)
char *s = strchr( (char *)szKeyName, '#' );
TemplateEntities.cpp(298)
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( size_t, size_t ); void * __cdecl _aligned_malloc_base( size_t size, size_t align ) { return _aligned_malloc(size, align); } void __cdecl _aligned_free_base( void *memblock ) { _aligned_free(memblock); } #endif[/quote]
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)
#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 Rotz