Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 11-06-2006, 02:26 PM   #1 (permalink)
aetherh4cker's Avatar
 
Corrupt Techie

Join Date: Sep 2005

Posts: 752

aetherh4cker is on a distinguished road

Default How to Install DirectX?

I was wondering how to install DirectX SDK so I can use it in my C++ project. I installed DirectX but I'm not entirely sure what I need to do beyond that to get it working with my IDE. Right now I use Eclipse but I'd take instructions for Visual C++ or anything, really.

I've tried fiddling around on my own but I just can't get it.

Here's the type of thing I'm getting:

#include <D3DX9.h>

fatal error C1083: Cannot open include file: 'D3DX9.h': No such file or directory
aetherh4cker is offline  
Old 11-06-2006, 03:19 PM   #2 (permalink)
 
Software Developer

Join Date: Mar 2006

Location: Columbus, OH

Posts: 569

jaeusm is on a distinguished road

Default

Do you have much experience with C++? If not, you may want to spend more time familiarizing yourself with the language before jumping into graphics programming. The error message seems self-explanatory: "No such file or directory". Since your compiler can't find the header file you've referenced, then you need to make sure it's in the proper directory. If it is, you'll need to instruct your compiler to look for header files in that directory. If the header is in the same directory as your source, you'll need to use quotes :
Code:
#include "D3DX9.h"
Maybe you just haven't set up the DX SDK properly.
jaeusm is offline  
Old 11-06-2006, 04:11 PM   #3 (permalink)
aetherh4cker's Avatar
 
Corrupt Techie

Join Date: Sep 2005

Posts: 752

aetherh4cker is on a distinguished road

Default

I don't think I set it up properly, that's what I'm asking.

I have a pretty good understanding of C++, but have never used graphics in any way.
aetherh4cker is offline  
Old 11-07-2006, 08:08 AM   #4 (permalink)
baronvongogo's Avatar
 
Master Techie

Join Date: May 2005

Location: UK

Posts: 2,749

baronvongogo is on a distinguished road

Default

did you link to the include and library folder?

In visual studio 2005 you go to tools>options>projects and solutions>vc++directories

then in the top right change where it says show directories for:

open the pull down menu and choose include and add the following to the list:

(this is where i installed the SDK if yours is in a different place link to that.)
C:\Program Files\Microsoft DirectX SDK (August 2006)\Include

then do as before open the pull down menu and choose libraries now and add the following and again if you installed in a different location change accordingly.

C:\Program Files\Microsoft DirectX SDK (August 2006)\Lib\x86

That will now give you access to all the directx headers and library files to use then you do:

#include "D3DX9.h"

or something along those lines to access the direct 9 header files. I haven't programmed using Directx yet but plan to do so soon I'm using OpenGL at the moment hope this has been of some help
__________________
baronvongogo is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On