This article describes how to set VC directory paths in Visual Studio 2008 to ensure that the most recent version of rpcsal.h is found. This article applies ONLY to users of DirectX SDK releases November 2008 and older. When using DirectX SDK (March 2009) or newer, the DirectX SDK should appear above the Windows SDK entries.
In order to utilize DirectX SDK resources you should ensure that the DirectX SDK include, library, and executables directories are set correctly in Visual Studio 2008. The order in which Visual Studio 2008 looks for executable directories and library files is important. The Windows SDK directories should appear above the DirectX SDK directories.
The DirectX SDK includes some files that are also shipped in the Windows SDK. These files may also be installed with the Windows headers and libraries that are included in Visual Studio 2008. It's possible to get a mixture of different versions of DirectX files on your computer, depending on what versions of the Windows SDK, DirectX SDK, and Visual Studio you install.
The Windows SDK Configuration tool can be used set the Windows 7 SDK as the “current” SDK for MSBuild and VCBuild. This will update the Windows 7 SDK build environment and the Visual Studio 2008 build environment to use the Windows 7 SDK headers, libraries and tools. You can also use this tool to switch it back again. However, the configuration tool does not set the DirectX SDK paths. You will need to do this manually, following the instructions in this article.
If you have installed the DirectX SDK and wish to build an application in the Windows SDK command line build environment, or in the Visual Studio build environments, you will need to set the VC++ directory paths manually. If you wish to build with the Windows 7 headers and libraries, you should ensure that directory path for this content is found first, before the DirectX SDK content.
In the following example I have installed the November 2008 version of the Microsoft DirectX SDK on a computer with the Windows 7 SDK and Visual Studio 2008.
How to set the C++ Directories manually
1. Launch Visual Studio 2008.
2. Open the Tools menu and select Options…. The Options dialog box appears.
3. In the left pane of the Options dialog box, expand the Projects and Solutions node.
4. Under Project and Solutions, select VC++ Directories.
5. In the right pane, set the "Platform" drop-down list box to Win32® and the "Show directories for" drop-down list box to "Executable" files.
6. At the bottom of the list of executable file directories, create a new entry for the DirectX SDK: [drive]:\Program Files\Microsoft DirectX SDK [version]\Utilities\bin\x86 (If there is already such an entry, move it to the bottom of the list.)
7. Set the "Show directories for" drop-down list box to "Include" files.
8. At the bottom of the list of directories, create a new entry for the DirectX SDK: [drive]:\Program Files\Microsoft DirectX SDK [version]\Include (If there is already such an entry, move it to the bottom of the list.)
9. Set the "Show directories for" drop-down list box to "Library" files.
10. At the bottom of the list of directories, create a new entry for the DirectX SDK: [drive]:\Program Files\Microsoft DirectX SDK [version]\LibX86 (If there is already such an entry, move it to the bottom of the list.)
11. If you are developing an application to run on AMD64, you should repeat these steps to set the AMD64 paths by setting the "Platform" drop-down list box to X64 and providing the appropriate paths.
12. Click OK.
Karin Meier-Magruder
Program Manager
Windows C++ Team
Send your thoughts to the Windows SDK Feedback alias. Tell us how you use the SDK and what we can do to improve your development experience.
The MSDN Windows SDK Developer Center is the place to find resources and links to Windows SDK products, release notes, technical articles, and more.