C++? Created 9 years ago2015-03-20 23:30:13 UTC by _Vissova_ _Vissova_

Created 9 years ago2015-03-20 23:30:13 UTC by _Vissova_ _Vissova_

Posted 9 years ago2015-03-20 23:31:11 UTC Post #324820
I have Half-Life SDK installed, but haven't been able to do anything with it because, if I remember correctly, C++ (whichever version it was) would either not install (I'm using Win8) or it gave errors beyond my understanding.
I remember there being a thread on this site where someone asked for C++. I'm pretty much asking that. I had a ton of trouble finding C++ to install. Or are there any good alternatives I can use?
I would really like to do more than just make maps, textures, and models in my projects.
Posted 9 years ago2015-03-21 02:44:18 UTC Post #324825
This would help me out too. I've been having some issues finding the right version of Visual Studio to compile with, someone told me a specific one was required.

Notepad++ is fine for writing things out but yeah, I have no idea how to compile.
Posted 9 years ago2015-03-21 03:09:34 UTC Post #324826
I think it was built for C++ 6.x, but as it's been noted on other recent threads, any version will do. You just have to follow the instructions in the compile errors to fix some details and it'll run just fine.
Posted 9 years ago2015-03-21 04:00:42 UTC Post #324827
You're talking about C++ as if it's a program, but Visual Studio is what you are actually talking about. Stu is right that it was built using VS6 (if I recall, with service pack 5 and another assembly language install), but it should also build in VS2008 (not sure about newer versions of VS) after you fix the errors. You can use the free express edition of VS2008.

(This is based on when I built the SOHL binaries, so sorry if it's different on the standard SDK.)

Most of the errors are pretty straight forward messages that say something like "cannot resolve X, use BlahBlah::X instead" - for those ones, just do what the message says.

Almost all of the other errors are re-using variables in for loops like this:
for(int i = 0; i < length; i++) {}
for(i = 0; i < length; i++) {}
To fix it, move the "int i" to its own line and just use "i=0" for both loops, like this:
int i;
for(i = 0; i < length; i++) {}
for(i = 0; i < length; i++) {}
Penguinboy PenguinboyHaha, I died again!
Posted 9 years ago2015-03-21 04:27:23 UTC Post #324828
there is a download on moddb that has a version of the HL sdk that is friendly with vs 2008 (no compile errors). There are like a hundred of those errors that penguinboy mentioned that exist in the normal HL sdk. There was also a way to deal with those vs 2008 errors by changing one single setting, but I forgot what it was
Posted 9 years ago2015-03-21 07:29:30 UTC Post #324829
Valve have released the source code for Half-Life to work with Visual Studio 2010. In case that interests anyone.
Dr. Orange Dr. OrangeSource good.
Posted 9 years ago2015-03-21 08:03:07 UTC Post #324830
Valve have released the source code for Half-Life to work with Visual Studio 2010. In case that interests anyone.
link pls ;]

i have found something what should work with visual studio 2008...

http://www.moddb.com/games/half-life/downloads/half-life-sdk-v23-for-visual-studio-2008
Posted 9 years ago2015-03-21 08:08:54 UTC Post #324831
Here's the VS2010 release he's talking about: https://github.com/ValveSoftware/halflife/
Penguinboy PenguinboyHaha, I died again!
Posted 9 years ago2015-03-21 16:21:10 UTC Post #324847
visual c++ 6 works great with hl
Posted 9 years ago2015-03-22 00:35:14 UTC Post #324877
Thank you for the responses and info. I'm still not having any luck actually getting Visual Studio, though. I just don't have any luck finding it, or something. :\
Posted 9 years ago2015-03-22 00:50:24 UTC Post #324882
You only need to download one of these, depending on what code you are using. The Github code should work with VS2010, so probably use that.

VS 2008 Express

VS 2010 Express
Penguinboy PenguinboyHaha, I died again!
Posted 9 years ago2015-03-22 02:39:11 UTC Post #324896
Ugh. I really don'y understand this.
I installed what you gave me, but there isn't an exe for VS anywere. But I found a "vs_setup" in a visual studio c++ 2008 folder, but it gives the following error:
error 32003 file "c:/program files (x86)/microsoft visual studio 9.0/common7/tools/vsvars32.bat" could not be opened to write.

I'm not usually this clueless, but I don't understand how this is meant to work or why things aren't working. Have I done something wrong?
Posted 9 years ago2015-03-22 04:20:47 UTC Post #324898
Did you run through the full install process, and did you get any errors? If it installed correctly, I don't know why it wouldn't be working... Maybe try the online installer instead? The installer is here: https://go.microsoft.com/?linkid=7729279
Penguinboy PenguinboyHaha, I died again!
Posted 9 years ago2015-03-22 07:59:09 UTC Post #324904
The actual .exe isn't in the main directory of Visual Studio. Look through the different folders until you find an exe named "vs2010.exe" or something like that. I think "vs_setup.exe" will either re-install Visual Studio or uninstall it.

It's devenv.exe located at "[vs install]\Common7\IDE\devenv.exe". But you should use the shortcut it put in your start menu or desktop instead. -Penguinboy
Dr. Orange Dr. OrangeSource good.
Posted 9 years ago2015-03-22 10:39:13 UTC Post #324906
you dont have any luck or you dont have any money? or brain? ive heard the pirates in the ships got everything you need
Posted 9 years ago2015-03-22 11:30:45 UTC Post #324909
The Express Editions of VS are free and they work with the HL SDK. There's no need to pirate anything.
Penguinboy PenguinboyHaha, I died again!
Posted 9 years ago2015-03-22 19:45:44 UTC Post #324931
It seems to be working now!
Thank you for the help, everyone. I'm sure I can figure everything else out on my own. Sorry for being so clueless with this, it was a bit confusing for some reason.

I have one more question:
Does there exist a Spirit Of Half-Life SDK of some kind? I would like to use SOHL, but with changes.
You must be logged in to post a response.