Sign in to follow this  
Chaosenemy

Cannot open include file: 'd3d9': No such file or directory

Recommended Posts

I'm using Microsoft Visual Studio 2005 and just installed the DirectX SDK (Nov 2007). I've gone into the solution properties and added the DirectX SDK's \include and \lib\x86 directories, but VS refuses to find d3d9.h. What am I doing wrong?

Share this post


Link to post
Share on other sites
You didn't install the SDK correctly or you didn't set the paths correctly.

Can you provide more information? Where are the SDK files on your disk (and are you sure they're there?)? What full path did you enter in the path dialog? Did you make sure to enter the library paths in the library section and the header paths in the header section? Et cetera.

Share this post


Link to post
Share on other sites
I downloaded the DirectX SDK (Novemeber 2007) from the Microsoft website and installed it to "F:\Programs\DXSDK Nov 2007". Then I went into Visual Studio 2005, right clicked on my solution, went to "properties>debug source files" and in the "Directories containing source code" box, I added "F:\Programs\DXSDK Nov 2007\Include" and "F:\Programs\DXSDK Nov 2007\Lib\x86" to the list. Now when I compile my code (which #includes d3d9.h) it gives me the error "Cannot open include file: 'd3d9': No such file or directory".

EDIT: Also, I checked the Include directory I supplied VS2005 with and d3d9.h is definitely there.

Share this post


Link to post
Share on other sites
Main menu: Tools -> Options.
Project and Solutions -> VC++ Directories (change Show directories for for the appropriate type before adding the locations).

Share this post


Link to post
Share on other sites
To clarify, you put the paths in the wrong spot. You don't want them in the "Debug Source Files" list, you want them in the interface that WanMaster pointed out.

That window will have a pull-down for the directory types, one for Libraries, Include Files, Executables, et cetera. That's where the compiler looks for files. The place you were looking at is for something else entirely.

Share this post


Link to post
Share on other sites
Quote:
Original post by WanMaster
Main menu: Tools -> Options.
Project and Solutions -> VC++ Directories (change Show directories for for the appropriate type before adding the locations).


Why thank you good sir; that did it.

Quote:
Original post by jpetrie
To clarify, you put the paths in the wrong spot. You don't want them in the "Debug Source Files" list, you want them in the interface that WanMaster pointed out.

That window will have a pull-down for the directory types, one for Libraries, Include Files, Executables, et cetera. That's where the compiler looks for files. The place you were looking at is for something else entirely.


Heh, yes I see that... *smacks himself* Thanks for the help guys.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this