Cannot find file:d3dx9.h

This is a discussion on Cannot find file:d3dx9.h within the C++ Programming forums, part of the General Programming Boards category; Hi, Whenever I try to run a C++ game, I always get the same error report: "Cannot find file directory:"d3dx9.h". ...

  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    3

    Question Cannot find file:d3dx9.h

    Hi,
    Whenever I try to run a C++ game, I always get the same error report: "Cannot find file directory:"d3dx9.h". I have reinstalled DirectX a couple of times and I get the same error. Any suggestions?

  2. #2
    Registered User valaris's Avatar
    Join Date
    Jun 2008
    Location
    RING 0
    Posts
    507
    Did you setup your compilers include path to point to the directory that contains d3dx9.h?

  3. #3
    Registered User
    Join Date
    Jul 2004
    Location
    Phoenix, Arizona
    Posts
    26
    Make sure you download the actual DirectX SDK and not just install the runtimes.

  4. #4
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    You must install the SDK and not just DirectX or you won't get any of the headers or libs you need to compile against it.

  5. #5
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    1,691
    One thing worth mentioning...
    What compiler are you using? It can be a real pain to get the DirectX SDK running with GCC or other similar compilers. You should use Visual Studio to compile DX programs.
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  6. #6
    Registered User
    Join Date
    Jun 2009
    Posts
    3
    I cant even find the d3dx9.h file anywhere on my computer, so I can't really edit the path. Also, I am using Visual C++.

  7. #7
    Registered User valaris's Avatar
    Join Date
    Jun 2008
    Location
    RING 0
    Posts
    507
    That would explain the error...
    Download the sdk from microsofts website.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem building Quake source
    By Silvercord in forum Game Programming
    Replies: 16
    Last Post: 07-11-2010, 10:13 AM
  2. could not find -lwsock32.lib
    By thomas_joyee in forum C++ Programming
    Replies: 8
    Last Post: 07-14-2008, 01:28 PM
  3. How to find O of threads ?
    By jabka in forum C Programming
    Replies: 3
    Last Post: 03-11-2008, 01:25 PM
  4. how do u find 2nd largest number??
    By juancardenas in forum C Programming
    Replies: 8
    Last Post: 02-14-2003, 08:28 AM
  5. Q: Recursion to find all paths of a maze
    By reti in forum C Programming
    Replies: 7
    Last Post: 11-26-2002, 09:28 AM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21