Just some notes that I wrote in 2007 for my Direct3D shader kick start. I need to say the tutorial is already a bit out dated. I kept it here for my reference only. Please do not follow it if you are a newbie.
//———————————————————–
/* Author: Son Hua */
/* Date: 30/05/2007 */
/* How to create an empty template project for Direct3D programming */
If you’re a newbie in Direct3D programming, and if you’re looking for a step-by-step guide to create a framework project to use for your Direct3D programming homework, then this is for you!
First of all, you need to:
1. Install DirectX SDK
2. Install Microsoft Visual Studio 2005, with Platform SDK (which includes winmm.lib and comclt.lib, which is used by the common framework in DirectX SDK sample directory).
Visual Studio 2005 configuration:
You will have to do some settings for VS2k5 to automatically find header files and library files (.h, .lib) of Direct3D (d3d9.h, d3d9.lib or something like that).
Tools -> Options, go to Project and Solutions node, select VC++ Directories
Choose following items from the combo box on right top of the window:
Include directories –> Add the path to the Include directory in DirectX SDK installation folder.
e.g. $(DXSDK_DIR)Include
Library directories (.lib) –> Add the path to the Lib directory in DirectX SDK installation folder.
e.g. $(DXSDK_DIR)Lib\x86
Another approach is that you can set these options in Project Properties of a particular project, but then you will need to repeat this work every time you create a new Direct3D project from scratch. So do it once in the VS2k5 settings instead.
So that’s it.
Then you can copy the source files in the Common folder of DirectX SDK Samples into your project, modify any #pragma comment (lib, “…”) if needed (to refer to your necessary library, e.g. d3dx9.lib, d3dx9d.lib). Define any necessary constant if needed.
#pragma comment(lib, “d3d9.lib”) –> Link to d3d9.lib (static lib) when compile. You also can declare it in Project Properties instead using #pragma.
error LNK: 2019: unresolved symbols –> means that some static lib are missing. (Header files are included, but no execution code (inside the static libs) is found as the libs are missing). Using #pragma comment(lib, “…”) to link to more libs if needed.



