Changes

Jump to: navigation, search

GAM666/DPS901 Student Resources

3,635 bytes added, 23:27, 9 October 2010
A Note on Visual Studio Includes: Added A Note on Visual Studio Includes.
=Student Resources=
The purpose of this page is to provide a space for students to share useful information that can help groups with their game projects.
 
==A Note on Visual Studio Includes==
A problem that we ran into here at [[Team Mutalisk]] was that our '''vcxproj''' file was being committed into the repository along with the committing user's include information. The problem with this was that other members had different include paths to the DX SDK and so when they updated after that user had committed, their '''vcxproj''' file would be updated and the project would not compile for them.
 
We've come up with a solution to this problem:
 
# Set the header include path ('''Solution->Right-Click Project->Properties->Configuration Properties->VC++ Directories->Include Directories''') for the project to: <code>$(IncludePath);%INCLUDE%;</code>
# Set the library include path ('''Solution->Right-Click Project->Properties->Configuration Properties->VC++ Directories->Library Directories''') for the project to: <code>$(LibraryPath);%LIB%;</code>
# Do this for all configurations ('''Solution->Right-Click Project->Properties->Configuration(top of box)''')
# Create/Set the environmental variables <code>INCLUDE</code> and <code>LIB</code> on your system. Do this through the '''Environment Variables''' dialog box.
#* ('''Win7/Vista:''' Start Menu->Right-Click Computer->Properties->Advanced system settings->Advanced tab->Environment Variables)
#* ('''WinXP:''' Start Menu->Right-Click My Computer->Properties->Advanced tab->Environment Variables)
# You can add the environment variables to either only your account, at which point the project will only compile when you are logged into your own account, or to the entire system, at which point the project will compile will compile on any account on your machine. Make a decision and then click '''New''' under the appropriate list (top is user, bottom is system).
#* Please note that in order to modify system environmental variables, your account must possess admin privileges or you must know the admin credentials (win 7) or must be logged into the admin account (Vista or older).
# First create the variable <code>INCLUDE</code>. Enter <code>INCLUDE</code> in the '''Variable name''' box. Enter the path to your DX SDK/Include in the '''Variable value''' box; eg if my DX SDK is located at <code>C:\Program Files\Microsoft DirectX SDK (August 2007)</code> then the value of my <code>INCLUDE</code> variable would be: <code>C:\Program Files\Microsoft DirectX SDK (August 2007)\Include;</code>
# Second create the variable <code>LIB</code>. Enter <code>LIB</code> in the '''Variable name''' box. Enter the path to your DX SDK/Lib/x86 in the '''Variable value''' box; eg if my DX SDK is located at <code>C:\Program Files\Microsoft DirectX SDK (August 2007)</code> then the value of my <code>LIB</code> variable would be: <code>C:\Program Files\Microsoft DirectX SDK (August 2007)\Lib\x86;</code>
#* Please note that if either of the two variables already exists on your system, simply edit its value and concatenate the relevant path to its current value. Ensure that all paths are separated by semicolons. Eg: <code>C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib;C:\Program Files\Microsoft DirectX SDK (August 2007)\Lib\x86;</code>
# Logout then login to refresh the windows environmental variable cache.
# Attempt to compile the project. Assuming that you have no syntax errors or other unrelated problems, the project should compile. If it does, then it's time commit the '''vcxproj''' file to your repository. Now that it's up there, others can modify it (add/remove files) without worrying about breaking other group members' dependencies.
 
This concludes the vcxproj tutorial, cheers!
 
-[[User:NorthWind87|northWind]]
==Useful diagrams==

Navigation menu