Sign in to follow this  
X-Mind

Hi all need a bit help

Recommended Posts

hi my friend , I hope to be a game programmer so i decide to begin programming games with C++ so for that i've read about C++ and learn how to program, and I install the DX9SDK ,and open my -DirectX Sample Browser- and select the -Tutorial 1: CreateDevice- project files and start to compile the project but badly i've got this error and i hope you to help me to resolve it, thanks. --------------------Configuration: CreateDevice - Win32 Debug-------------------- Compiling... CreateDevice.cpp C:\DXSDK\Samples\C++\Direct3D\Tutorials\Tut01_CreateDevice\CreateDevice.cpp(10) : fatal error C1083: Cannot open include file: 'd3d9.h': No such file or directory Error executing cl.exe. CreateDevice.obj - 1 error(s), 0 warning(s)

Share this post


Link to post
Share on other sites
Where did you install the SDK to? Find out where "d3d9.h" is first. Once you've done that you can either move it (and the others) to the appropriate folder so that you don't have to put anything other than "d3d9.h", otherwise write "#include "<directory>\d3d9.h", where directory would be what goes before it when you're in windows exlorer, for example, C:\Jim\D3D9SDK\include...

Share this post


Link to post
Share on other sites
thank you Side Winder for your help but
I did that before but it didn't work ,so that make me hate the C++ because I try to program with it but I can't because I've always got errors ( I was programming games with vb6 before )

Share this post


Link to post
Share on other sites
Is your d3d9.h in the Include\ directory in visual studio?
Is your d3d9.lib file in the Lib\ directory?
Are you linking d3d9.lib?

(I dont have visual studio installed atm, so the paths may be different)

Also, insure the INCLUDE and LIB paths are set in visual studio.
(You can test this by #include <windows.h>)

Share this post


Link to post
Share on other sites
What IDE are you using? (Visual Studio?)

Are you able to build a simple Win32 program (without DirectX)?

**Ensure d3d9.h is in the same directory as your other include files are.

If it is, and #include <d3d9.h> still fails, I am suspecting your IDE
paths are incorrectly set.

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