Talk:Compiling under VS2005: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Moving testimonials in from main page)
m (Not much need to screenshot this)
 
(75 intermediate revisions by 36 users not shown)
Line 1: Line 1:
== Comments ==
* [[Talk:Compiling under VS2005/20090316|Archive 2009/03/16]]
I'll admit, I don't own VS2005, but I can't see any reason why it wouldn't be backwards compatible. --[[User:Alph Tech STUART|Alph Tech STUART]] 09:27, 17 Dec 2005 (PST)


I own it, and it's not really backwards compatible... You can convert it, but it gives you hell of warnings and errors, that's why i kept on trying to get it to compile... Here's my works result ;) --[[User:Rotzi]]
== Visual C++ Express 2005 Directories Setup ==


I successfully compiled using the listed instructions, but it did not run very well. I believe the heap is being corrupted, the issue seems to be present in both release and debug configurations, although it seems less evident in the release configuration. I think this may be due to hl2.exe being linked with the non-multithreaded C runtime from the 2003 version of Visual Studio. Visual Studio 2005 appears to only have multithreaded C runtimes. It may be possible to get a stable build if you can force Visual Studio 2005 to link against the libc from the Visual C++ 2003 toolkit, rather than just telling it to ignore libc. I haven't tried it, and I haven't read the toolkit license to determine if that's actually an ok thing to do. --[[User:MiasmicAnomie]]
After installing the Microsoft Windows (Platform) SDK, when setting up the directories in Visual C++ Express 2005 do you need to add "Source Files"?? It has one entry:


I successfully compiled as well with Visual Studio 2005 with these instructions with 0 errors and 2 warnings for hl and 3 warnings for client, Playable, MP source.. added my results to the "Whats Working Section". Also I didn't have to do any of the rpg fixes. Happy coding. --[[User:digitaldrowning]]
$(VCInstallDir)crt\src


== Misc ==
I found this directory in the Platform SDK:
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? --[[User:AndrewNeo|AndrewNeo]] 07:11, 28 Jan 2006 (PST)


Yes, what i read is there are no Problems with normal, full Version of VS 05, but i had problems... same as with express. --[[User:Rotzi|Rotzi]] 4 Fe 2006 (GMT+1)
C:\Program Files\Microsoft Platform SDK\src\crt


===Other Fixes / Comments===
Just curious if it needs to be added.


got some info from [http://www.chatbear.com/board.plm?a=viewthread&t=104,1102070328,6443&b=4991&id=949052&v=flatold&s=0 this forumthreat]
== ==
OK, looks like I Googled for nothing, so I'm going to warn you guys now, if your getting errors, look in this page, because I Googled for 2 hours, just to be lead back to the page I started on, but at least it all works now, I'm glad for that. In conclusion, make sure you aren't looking at the fix before you Google for it...


i had some errors in c_rope
== PRJ0019 ==


fixed it once with:
When I Build my Mod (Debug), I get this error:


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


behind ''++m_aRenderCache[iRenderCache].m_nCacheCount;''
echo Project : error PRJ0019: A tool returned an error code from "Copying to c:\program files\steam\steamapps\SourceMods\hunternavan\bin\"


(means from line 231 (i think) to line 252)
What do I do? --[[User:Adam.gamedev|Adam.gamedev]] 17:45, 12 July 2010 (UTC)


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


greetz
When I Debug my Mod, I get this error:
  Setup file 'gameinfo.txt' doesn't exist in subdirectory 'hl2'.
  Check your -game paremeter or VCONFIG setting.


[[User:Rotzi]] Jan 2006
What do I do? --[[User:Adam.gamedev|Adam.gamedev]] 19:33, 12 July 2010 (UTC)
 
 
grml...
 
doesn't work neither with express nor with full version... maybe i'm just stupid...
 
I'll try again this weekend and update here...
 
[[User:Rotzi]] Feb 2006
 
 
And still I'm having problems... Just tried it again, Release Client only, but did not get past 3 kinds of errors, wich all in all were 190 errors and 439 warnings...
 
I also noticed that including user32.lib and excluding LIBC did not change these error-numbers, so atleast up to that point, it did not need them... Still I'm only talking about client-Release Only.
 
[[User:Rotzi]]
 
I'd recommend /not/ using #pragma warning to disable the deprecated function comments... if you add _CRT_SECURE_NO_DEPRECATE and _CRT_NON_CONFORMING_SWPRINTFS to the preprocessor options for the projects, and then run a series of simple find/replaces across the solution (no more than about 6 - stricmp->_stricmp, __stricmp->_stricmp, strnicmp->_strnicmp, __strnicmp->_strnicmp, and a few others in similar fashion) then it actually fixes the warnings instead of just making the compiler not tell us about them. --[[User:Superpig]]
 
Also, a nicer fix for ..\tier1\KeyValues.cpp(800): just change the type of the variable to be a const char* instead of a char*. --[[User:Superpig]]
 
And again for ..\cl_dll\hud_bitmapnumericdisplay.cpp(159): Change "10" to "10.f". No need to explicitly cast it. --[[User:Superpig]]
 
----
 
No longer needed, just if i/we need it again... ;)
'undeclared variable'
..\cl_dll\interpolatedvar.h(538)
..\public\sentence.cpp(735)
..\public\sentence.cpp(1098)
..\public\sentence.cpp(1168)
 
----
 
[[User:Mosca]]
 
I always hear about valve porting the sdk to VS2005, does any one has news on that, or we should wait until after EP1?

Latest revision as of 23:30, 17 July 2011

Visual C++ Express 2005 Directories Setup

After installing the Microsoft Windows (Platform) SDK, when setting up the directories in Visual C++ Express 2005 do you need to add "Source Files"?? It has one entry:

$(VCInstallDir)crt\src

I found this directory in the Platform SDK:

C:\Program Files\Microsoft Platform SDK\src\crt

Just curious if it needs to be added.

OK, looks like I Googled for nothing, so I'm going to warn you guys now, if your getting errors, look in this page, because I Googled for 2 hours, just to be lead back to the page I started on, but at least it all works now, I'm glad for that. In conclusion, make sure you aren't looking at the fix before you Google for it...

PRJ0019

When I Build my Mod (Debug), I get this error:


echo Project : error PRJ0019: A tool returned an error code from "Copying to c:\program files\steam\steamapps\SourceMods\hunternavan\bin\"

What do I do? --Adam.gamedev 17:45, 12 July 2010 (UTC)

gameinfo.txt

When I Debug my Mod, I get this error:

 Setup file 'gameinfo.txt' doesn't exist in subdirectory 'hl2'.
 Check your -game paremeter or VCONFIG setting.

What do I do? --Adam.gamedev 19:33, 12 July 2010 (UTC)