Compiling under VS2005: Difference between revisions
(Added section "Open the solution", copied and modified from Compiling under VS2008) |
Justincase (talk | contribs) m (windows update fix for other Windows OSes) |
||
Line 12: | Line 12: | ||
VCE2005 is no longer supported by or officially available from Microsoft. [http://download.microsoft.com/download/8/3/a/83aad8f9-38ba-4503-b3cd-ba28c360c27b/ENU/vcsetup.exe It can still be downloaded from their servers], but might disappear from them at any time! | VCE2005 is no longer supported by or officially available from Microsoft. [http://download.microsoft.com/download/8/3/a/83aad8f9-38ba-4503-b3cd-ba28c360c27b/ENU/vcsetup.exe It can still be downloaded from their servers], but might disappear from them at any time! | ||
After Visual Studio or VCE has been installed, run Windows Update to patch it. Do this twice if you are using Windows Vista to catch a compatibility update. | After Visual Studio or VCE has been installed, run Windows Update to patch it. Do this twice <s>if you are using Windows Vista to catch a compatibility update.</s> as the first time will get the Service Pack 1 update and the second time will grab a security update. | ||
== Windows SDK == | == Windows SDK == |
Revision as of 00:00, 1 December 2010
Visual Studio 2005 is the officially-supported IDE of the Source SDK, and if all is well you won't need to do anything special to use it. If you're using Visual C++ 2005 Express or if something is awry however, read on to get it up and running. This page assumes you are compiling the latest Orange Box source code.
Installing
VCE2005 is no longer supported by or officially available from Microsoft. It can still be downloaded from their servers, but might disappear from them at any time!
After Visual Studio or VCE has been installed, run Windows Update to patch it. Do this twice if you are using Windows Vista to catch a compatibility update. as the first time will get the Service Pack 1 update and the second time will grab a security update.
Windows SDK
If you're using Visual C++ Express 2005 you need to install the Windows SDK. (If you're using Visual Studio 2005 this has already been done for you.)
It doesn't matter which version you download; this one does the job well enough. Don't worry that it talks about Vista - it also covers XP. Windows 2000 users however need to download the older Platform SDK instead.


Once you have the Windows SDK installed, you need to tell Visual C++ where the SDK is located. To do this, navigate to Tools > Options > Projects and Solutions > VC++ Directories. Add the Windows SDK's \bin
folder to the list. The default location is C:\Program Files\Microsoft SDKs\Windows\v6.1\bin
.
Click on the drop-down list that currently says "Executable files". You need to add the \include
folder to the 'Includes' list and the \lib
folder to the 'Library' list.

Open the solution
- Launch your copy of Microsoft Visual Studio.
- Select File->Open->Project/Solution from the menu and open the Game_Episodic-2005.sln solution located in your mod's
src
directory, select the one that matches your version of Microsoft Visual Studio. If you selected mod from scratch, "Scratch" will appear there instead.
LNK2019 errors
If you receive these errors, right-click on the client and server projects in turn and select the last option in the menu, Properties. Then navigate to Configuration properties > Linker > Input and make the first item, "Additional Dependencies", read winmm.lib user32.lib
. Make sure you've done this for both Debug and Release mode (switch between them in the top left of the Properties window).
If you get "unresolved external" errors, try adding kernel32.lib
as well.
intrin.h errors
This is a bug with VC++2005 that you may encounter. To fix it, open C:\Program Files\Microsoft Visual Studio 8\VC\include\intrin.h
and comment out lines 944 and 945. This fixes a contradiction between two VC++ header files and shouldn't cause any damage.
If you continue to receive errors, comment out the referenced lines (typically 913 and 912) and recompile.
Running your mod
Remember to run with -allowdebug if you've got debug builds!