Cannot find file: "d3dx9.h" No such file or directory.

Started by
4 comments, last by leeor_net 14 years, 9 months ago
Hi to all, I'm trying to build a game file with C++, and whenever I view the error for the build result it says "Cannot open include file: 'd3dx9.h' no such file or directory.", and I think that this file is missing on my computer. I have reinstalled DirectX twice, and nothing seems to work. Have any suggestions?
Advertisement
Have you added the appropriate header and library paths to your project?
When you say you reinstalled DirectX, do you mean the end user download, or the developer download, the DirectX SDK? What you want is the latter.
Hi,
I have the file downloaded, but my compiler can't seem to find the file. I have tried searching in Tools>Options>Projects and Solutions>VC++ Project Settings and apparently there is a "Source file" button somewhere there, but I can't find it. Any Help?
You need to add the DirectX/Include folder to your project's search path. In Visual C++, you can do this by navigating to Properties->C/C++->General->Additional Include Directories. Add the path to your DirectX/Include folder there and everything should work fine.
The DirectX SDK generally adds the environment variables on its own. You need to make sure that you're downloading the SDK and not the redistributable package.

Here's a direct link: http://www.microsoft.com/downloads/details.aspx?FamilyID=24a541d6-0486-4453-8641-1eee9e21b282&displaylang=en

-Lead developer for OutpostHD

http://www.lairworks.com

This topic is closed to new replies.

Advertisement