Microsoft DirectX 8.0 (C++)

Preparing for Compilation

The samples included in this SDK use Microsoft® Visual C++® project files (DSP files) that describe the appropriate source files, project resources, and linker settings for each sample. However, you might need to make additional preparations to ensure that the samples compile and link properly, or you might need to prepare settings for a new project. The information provided here applies to the Microsoft DirectX® samples and the DirectX applications that you create.

After opening a project file in Visual C++, verify some settings before compiling the application. The following descriptions are valid for Visual C++ 5 and 6.

Note  The following discussion uses the default installation paths, C:\Mssdk\Include and C:\Mssdk\Lib, to describe file locations. Your installation paths might differ.

Include search paths

Be sure that the search path for header files is correct and the directory for DirectX header files is the first path that the compiler searches. To check the include path, choose Options from the Tools menu and select the Directories tab. The following dialog box will appear.

The topmost path indicates the folder that contains the latest DirectX header files. The default path is C:\Mssdk\Include. If the path is not present, add it to the list and move it to the top of the search list by using the toolbar controls within the Directories tab.

Linker search paths

Check the search paths and search order that the linker uses to search for link libraries. The link search paths are also listed on the Directories tab. Choose Options from the Tools menu and select the Directories tab. When the dialog box appears, choose the Library files option in the Show directories for list box. The topmost path should be the folder that contains the latest DirectX link libraries. The default path is C:\Mssdk\Lib.

Project link libraries

If you are using the provided sample project files, you do not need to verify these settings. They are specified with the project files. For new applications, on the Project menu, click Settings. The following dialog box appears.

You should verify that the application is linked to the appropriate standard DirectX link libraries.