DirectX 10 Step 1: Getting the tutorials to run…

I downloaded the latest DirectX 10 SDK from the DirectX Developer Center website, fired up Visual Studio 2008, opened the first tutorial and hit F5.  The first thing I saw was a build failure and an item in the error list complaining that a file called d3d10sdklayers.h could not be found.
The actual error message was:
fatal error C1083: Cannot open include file: ‘d3d10sdklayers.h’: No such file or directory
outputwindow errorwindow

This felt suspiciously like a DirectX core file that couldn’t be located.  I was mildly surprised that the SDK installer hadn’t configured Visual Studio but my instincts still pointed me towards that possibility.  A very brief search of the DirectX SDK install directory revealed the location of a directory called Include that contained the missing file. VC++ locates shared files by scanning a set of known directories. You can access this list by selecting Tools->Options->Projects and Solutions->VC++ Directories. The drop-down list in the top-right corner contains different locations for a variety of file types. Sure enough the DirectX SDK include directory wasn’t in the list for Include files. That’s easy enough to fix. Just add the path to the list.
vcppdirectories

While you’re in that dialog there is another directory that needs to be added, this time for Library files. The path is almost the same, except this time select: C:\Program Files\Microsoft DirectX SDK (March 2009)\Lib\x86 (adjust for your installation location).

Once the VC++ directories lists have been updated, the build succeeded and the tutorial ran successfully.  Excellent.  We’re off to a good start!

This entry was posted in Games, Uncategorized and tagged , , . Bookmark the permalink.

3 Responses to DirectX 10 Step 1: Getting the tutorials to run…

  1. Pio says:

    Thanks, this was very helpful 🙂

  2. Marak says:

    i know this post was a while ago, i just got around to getting the latest sdk – and the latest VC++ 2010. A little miffed they depreciated the global settings for VC++ meaning i have to set this up for every test project for the new libraries :s

    – marak

    Thanks for your tips though, saves me double checking and probably buggering it up a few times 🙂

  3. Essie says:

    І enjoy reading through yօur web ѕites. Thanks a lot!

Leave a Reply

Your email address will not be published. Required fields are marked *