Installing Microsoft Visual C++ Express
1.) Download the installation package from microsoft.com: MS VC++
2.) Run the file and allow it to install VC++.
3.) You might want to register after installing; either way, it is free.
Installing Microsoft DirectX SDK
1.) Download the installation package from microsoft.com: Download details: DirectX SDK - (February 2010)
2.) Install the SDK by running the executable.
3.) Once all that is done you want to configure Visual C++ so that it will find DirectX. ( Usually this is done automatically, but not always so I'll explain anyway. ) NOTE: This is for Visual Studio 2008, for the 2010 instructions scroll down!
VS2008
Open up VC++ and go to Tools -> Options, this dialog should pop up:
Click this bar to view the full image.
In the image you can see that I've highlighted some things you want to unfold. "Executable files" is also highlighted because you need to change it. First, change it to "Include files". Once you've done that you should add a new line and add the "Microsoft DirectX SDK (August 2009)Include" directory like so:
Click this bar to view the full image.
Notice that "Include files" is selected in the top right corner and that because I have a x64 OS my program files has (x86) behind it. If you do not have x64 OS then the DirectX SDK is located in the regular Program Files folder.
There are some other lines visible but those are not important for DirectX.
Now that we have the "Include" directories set up, we need to add the "Library" directories.
Select the "Library files" from the little drop-down list and again add a new line like so:
Click this bar to view the full image.
Notice that you need to select either the x86 directory in "Microsoft DirectX SDK (August 2009)Lib" or the x64. Select the x86 folder no matter what your OS is. ( x64 is used for building 64-bit applications which you will probably not be doing )
Now there is only very important step that yet remains: Click the OK button, don't just close the window as your settings will not be saved if you do.
For 2008; Visual C++ will now always find your DirectX SDK ( headers and libraries ). You should be able to compile DirectX dependant code just fine now.
VS2010
Right click on the project and go to properties:
Click this bar to view the full image.
Go to the Visual C++ Directories tab ( this is new in 2010 ) and add the correct libraries, scroll up to see which ones. ( They are detailed in the above pictures. ( Note that you might have the 2010 version of DirectX, the screenshots show the 2009 version, they should both work fine )
Click this bar to view the full image.
Some hints as to how to add new lines/folders:
1.) Download the installation package from microsoft.com: MS VC++
2.) Run the file and allow it to install VC++.
3.) You might want to register after installing; either way, it is free.
Installing Microsoft DirectX SDK
1.) Download the installation package from microsoft.com: Download details: DirectX SDK - (February 2010)
2.) Install the SDK by running the executable.
3.) Once all that is done you want to configure Visual C++ so that it will find DirectX. ( Usually this is done automatically, but not always so I'll explain anyway. ) NOTE: This is for Visual Studio 2008, for the 2010 instructions scroll down!
VS2008
Open up VC++ and go to Tools -> Options, this dialog should pop up:
Click this bar to view the full image.
In the image you can see that I've highlighted some things you want to unfold. "Executable files" is also highlighted because you need to change it. First, change it to "Include files". Once you've done that you should add a new line and add the "Microsoft DirectX SDK (August 2009)Include" directory like so:
Click this bar to view the full image.
Notice that "Include files" is selected in the top right corner and that because I have a x64 OS my program files has (x86) behind it. If you do not have x64 OS then the DirectX SDK is located in the regular Program Files folder.
There are some other lines visible but those are not important for DirectX.
Now that we have the "Include" directories set up, we need to add the "Library" directories.
Select the "Library files" from the little drop-down list and again add a new line like so:
Click this bar to view the full image.
Notice that you need to select either the x86 directory in "Microsoft DirectX SDK (August 2009)Lib" or the x64. Select the x86 folder no matter what your OS is. ( x64 is used for building 64-bit applications which you will probably not be doing )
Now there is only very important step that yet remains: Click the OK button, don't just close the window as your settings will not be saved if you do.
For 2008; Visual C++ will now always find your DirectX SDK ( headers and libraries ). You should be able to compile DirectX dependant code just fine now.
VS2010
Right click on the project and go to properties:
Click this bar to view the full image.
Go to the Visual C++ Directories tab ( this is new in 2010 ) and add the correct libraries, scroll up to see which ones. ( They are detailed in the above pictures. ( Note that you might have the 2010 version of DirectX, the screenshots show the 2009 version, they should both work fine )
Click this bar to view the full image.
Some hints as to how to add new lines/folders: