Compiling the Source Code

C++ Got ya down? Half-Life 2 Coding Related.
Locked
diabl091
Pixel
Posts: 4
Joined: Mon Mar 12, 2007 1:42 am

Compiling the Source Code

Post by diabl091 » Mon Mar 12, 2007 1:45 am

I'm trying to make a mod, but every time I go to compile the HL2-2005.snl in Visual 2005 C++ edition it keeps getting errors and doesn't compile can anyone help?

Bloomer
Vertex
Vertex
Posts: 17
Joined: Sat Mar 10, 2007 12:50 pm

Post by Bloomer » Mon Mar 12, 2007 3:08 am

I'd be happy to help ya! :D

If you have a basic understanding of the program, heres the fix:


Got it off wiki
Necessary steps are needed to enable compiling with the Visual Studio C++ 2005 Express Edition:

Files required:
http://msdn.microsoft.com/directx/sdk/
http://www.microsoft.com/downloads/deta ... laylang=en

Setup

Go to Tools - Options: Projects and Solutions - VC++ Directories

* In the upper right drop down box, select "Executable files" and add "...\Microsoft Platform SDK\Bin" (replace with the correct path)

* Then select "Include files" and add "...\Microsoft Platform SDK\Include" and "...\Microsoft DirectX SDK (December 2005)\Include"

* Then select "Library files" and add "...\Microsoft Platform SDK\Lib" and "...\Microsoft DirectX SDK (February 2007)\Lib\x86"

* Finally, go to the project properties for hl and client and add user32.lib to Linker->Input->Additional Dependencies (with spaces between entries)
Heres the wiki for it if you didn't understand that ;)

http://developer.valvesoftware.com/wiki ... quirements

Hope this helps! good luck!

User avatar
Frederic
npc_hunter
npc_hunter
Posts: 575
Joined: Mon Nov 20, 2006 4:35 pm
Location: Canada

Post by Frederic » Mon Mar 12, 2007 6:09 pm

Frostbite wrote:Ok, this is more of a fix, than a tutorial.
Tutorial
I didn't write all though need to make some corrections...
[Required Files]
Free Download (Get C++ version)
Platform SDK
DirectX SDK

Once done installing, follow that tutorial until you hit Step 3.
It asks for you to add the following lines into VC+ Directories
C:\Program Files\Microsoft DirectX SDK (February 2006)\Include
C:\Program Files\Microsoft DirectX SDK (February 2006)\Lib\x86

Change the 2006 to 2007, and keep following the tutorial.

When you hit Step 3b, it'll ask you to change a file.
Update the corewin_express.vsprops file.

One more step is needed to make the Win32 template work in Visual C++ Express. You need to edit the corewin_express.vsprops file (found in C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults) and

Change the string that reads:

AdditionalDependencies="kernel32.lib" to

AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
Instead download my fixed version Here.
Place it in "C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults" folder.

Then Open up the code, Change the build type to Debug_HL2 to Release_HL2 and compile!

User avatar
skidz
Obsidian Gold
Obsidian Gold
Posts: 3228
Joined: Mon May 29, 2006 6:36 am
Location: Maple Ridge, BC
Contact:

Post by skidz » Wed Mar 14, 2007 4:52 am


Bloomer
Vertex
Vertex
Posts: 17
Joined: Sat Mar 10, 2007 12:50 pm

Post by Bloomer » Wed Mar 14, 2007 11:05 am

Damn,

I don't understand why they dont just fix everything before they give it to us =/

Stupid Microsoft! :evil:

diabl091
Pixel
Posts: 4
Joined: Mon Mar 12, 2007 1:42 am

Post by diabl091 » Wed Mar 14, 2007 12:01 pm

Bloomer wrote:Damn,

I don't understand why they dont just fix everything before they give it to us =/

Stupid Microsoft! :evil:
Yeah but at least I got it compiled and debugged :D .

Bloomer
Vertex
Vertex
Posts: 17
Joined: Sat Mar 10, 2007 12:50 pm

Post by Bloomer » Wed Mar 14, 2007 1:26 pm

:D

What are you compiling?

If its a mp mod i wanna play Ö

User avatar
skolapper
Pixel
Posts: 1
Joined: Wed Sep 02, 2009 7:04 am
Location: Senegal
Contact:

Compiling the Source Code

Post by skolapper » Mon Sep 14, 2009 9:05 am

Um, What?

You mean custom actors? Or to compile custom things?

You cant run Source Code unless its compiled and then loaded and placed within the editor

User avatar
Shana
Lead Developer
Lead Developer
Posts: 3001
Joined: Tue Aug 29, 2006 8:12 pm
Location: Germany
Contact:

Post by Shana » Mon Sep 14, 2009 7:29 pm

gg.
Image

Locked