Compiling in Visual C++

-Psy-

Walking round in women's underwear
Joined
Mar 9, 2005
Messages
4,805
Reaction score
0
How do I compile shiz in Visual C++? I can only Build Solution and Build Client

------ Build started: Project: client, Configuration: Debug HL2MP Win32 ------
Compiling...
stdafx.cpp
c:\western warfare\src\cl_dll\interpolatedvar.h(538) : error C2065: 'i' : undeclared identifier
c:\western warfare\src\cl_dll\interpolatedvar.h(519) : while compiling class template member function 'void CInterpolatedVarArray<Type,COUNT>::RemoveEntriesPreviousTo(float)'
with
[
Type=Vector,
COUNT=1
]
c:\western warfare\src\cl_dll\interpolatedvar.h(343) : while compiling class template member function 'void CInterpolatedVarArray<Type,COUNT>::NoteChanged(float,float)'
with
[
Type=Vector,
COUNT=1
]
c:\western warfare\src\cl_dll\interpolatedvar.h(317) : while compiling class template member function 'CInterpolatedVarArray<Type,COUNT>::~CInterpolatedVarArray(void)'
with
[
Type=Vector,
COUNT=1
]
c:\western warfare\src\cl_dll\interpolatedvar.h(1213) : see reference to class template instantiation 'CInterpolatedVarArray<Type,COUNT>' being compiled
with
[
Type=Vector,
COUNT=1
]
c:\western warfare\src\cl_dll\c_baseentity.h(1470) : see reference to class template instantiation 'CInterpolatedVar<Type>' being compiled
with
[
Type=Vector
]
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version 8.00.50215
Copyright (C) Microsoft Corporation. All rights reserved.
BSCMAKE: error BK1506 : cannot open file '.\Debug HL2MP\AlphaMaterialProxy.sbr': No such file or directory
Build log was saved at "file://c:\Western Warfare\src\cl_dll\Debug HL2MP\BuildLog.htm"
client - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
Nope doesn't work. I even created a non-edited mod for HL2MP. And still shows 0 builds and 2 failures...:flame:
 
c:\western warfare\src\cl_dll\interpolatedvar.h(538) : error C2065: 'i' : undeclared identifier

"i" isnt a registerd command..i do C++ for aliving, it know a thing or too.. hehe
 
And that helps me how? I haven't even touched the code I Just build it. Pissing me off now this! Wtf doesn't it work!
 
You're using the C++ Beta, I see.

Try declaring the i. It's telling you what went wrong. There are a number of guides on how to fix the SDK for it, though. I can't recall where though.

-Angry Lawyer
 
did you do a nasty vb issue and do a for loop without declaring the variable i?

just wondering, a lot of vb6 coders do that, because you don't have to declare all your variables, makes you lazy.

otherwise, i would attempt a full rebuild, if it still fails as said above, declare i right above the code it states has the error.
 
Marco, you're a genius. I mean simply, you're the man. I registered on here just so I could tell you how much of a genius you are. Finally, someone who took the time and explained something to a me (a moron) in such a way that I not only saw how to immediately fix my problem, but also understood what caused it in addition to understanding the actual problem itself. Excellent. Today, I spell The Man...M-A-R-C-O. Thanks, bro.
Marco said:
The problem boils down to the fact that your version of the VC++ compiler is configured to use standard C++ behaviour for 'for' loops, which is to say that local initializers (the 'i' in this case) will go out of scope after the 'for' loop.

By default, VC++ .NET 2003 doesn't have the /Zc:forScope option enabled and the source code compiles just fine. You must be using a different version of the compiler that has this option enabled by default. You can, of course, try to declare 'i' as has been mentioned, but you might run into the same problem in other places of the source code. I suggest that you turn off standard C++ conformance for 'for' loops in the compiler settings.

In general, I'd suggest that you compile the source code with VC++ .NET 2003 and wait until Valve rolls out an official update of their code base that compiles correctly with newer versions of the compiler. Apparently, they're already in the process of doing so: http://msdn.microsoft.com/coding4fun/half-life/default.aspx
:thumbs:
 
Back
Top