943,681 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 16081
  • C++ RSS
You are currently viewing page 1 of this multi-page discussion thread
Jan 20th, 2008
0

Where to put d3dx9.h?

Expand Post »
Hey,

I download DarkGDK for Visual C++ 2008 Express (also downloading the correct version of the Direct X SDK). I just saved the SDK in some random directory, so when I try to execute the test code, i get an error telling me d3dx9.h can't be found. So, where do I put the SDK files so that Visual C++ can use them as include files?
Similar Threads
Reputation Points: 77
Solved Threads: 40
Posting Pro in Training
CoolGamer48 is offline Offline
401 posts
since Jan 2008
Jan 20th, 2008
0

Re: Where to put d3dx9.h?

you will probably have to tell the compiler where you put all those files. Fire up the compiler, then select menu item Tools --> Options. Exand the Project and Solutions tab, then select VC++ Directories Change the list box Show Directories For in the right dialog box and add the paths in appropriate places.

I just finished installing Dark GDK, and the installation program added the paths in appropriate places as I described above. If yours didn't, then you did not install Dark GDK correctly.
Last edited by Ancient Dragon; Jan 20th, 2008 at 3:51 pm.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is online now Online
21,949 posts
since Aug 2005
Jan 20th, 2008
0

Re: Where to put d3dx9.h?

You probably need to follow the steps in these instructions for setting up the Windows SDK in VC++Epress 2005 - telling VC where to find the includes and libs and executables.
Reputation Points: 1268
Solved Threads: 228
Posting Virtuoso
vmanes is offline Offline
1,895 posts
since Aug 2007
Jan 20th, 2008
0

Re: Where to put d3dx9.h?

Click to Expand / Collapse  Quote originally posted by vmanes ...
You probably need to follow the steps in these instructions for setting up the Windows SDK in VC++Epress 2005 - telling VC where to find the includes and libs and executables.
That's ok but he is not using that compiler. VC++ 2008 has all that fixed up. You don't have to do all that suff any more.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is online now Online
21,949 posts
since Aug 2005
Jan 20th, 2008
0

Re: Where to put d3dx9.h?

Update: I just successfully compiled and ran the same program "Animation Showcase" without any problems at all. No compiler warnings or errors.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is online now Online
21,949 posts
since Aug 2005
Jan 20th, 2008
0

Re: Where to put d3dx9.h?

I included the directory, but now it says that d3dx9.lib can't be opened, so I think I'm just going to try reinstalling - since something might have gone wrong anyway.

EDIT: If I do need to reinstall, how should I go about it? Would simply running the install file again work, or should I remove the DarkGDK folder and then reinstall (would doing that screw up any settings)?

Also, where did you save the DirectX SDK files when you installed them?
Last edited by CoolGamer48; Jan 20th, 2008 at 4:13 pm.
Reputation Points: 77
Solved Threads: 40
Posting Pro in Training
CoolGamer48 is offline Offline
401 posts
since Jan 2008
Jan 20th, 2008
0

Re: Where to put d3dx9.h?

It doesn't matter where you save the downloaded file from the Dark GDK download link -- you don't even have to save it but just run it when prompted to run or save.

That will save a file names "Dark GDK - 161107.exe". You have to execute that program, which will decompress all the files and install them in "\Program Files\The Game Creators\Dark GDK". My guess is that you did not run that program. After that is done your compiler should be set up to go. Just open the example program located at "\Program Files\The Game Creators\Dark GDK\Samples\Visual Studio 9" and see if you can compile one of them ok.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is online now Online
21,949 posts
since Aug 2005
Jan 20th, 2008
0

Re: Where to put d3dx9.h?

Quote ...
It doesn't matter where you save the downloaded file from the Dark GDK download link -- you don't even have to save it but just run it when prompted to run or save.
I meant the DirectX SDK files. When you install the August 2007 DirectX SDK, doesn't it make you put the files somewhere?

Quote ...
That will save a file names "Dark GDK - 161107.exe". You have to execute that program, which will decompress all the files and install them in "\Program Files\The Game Creators\Dark GDK". My guess is that you did not run that program. After that is done your compiler should be set up to go. Just open the example program located at "\Program Files\The Game Creators\Dark GDK\Samples\Visual Studio 9" and see if you can compile one of them ok.
I did run that program (or some other magical force put the files in \Program Files\The Game Creators\Dark GDK).

Now - wouldn't whatever compiler I'm using need to know where the DirectX SDK August 2007 files are for them to be any use? So either the DarkGDK installer would set that up ( and I don't know how it would do that since it doesn't know where you saved the DirectX SDK files), or the DirectX SDK installer would set that up, or you would have to do it manually, right?
Reputation Points: 77
Solved Threads: 40
Posting Pro in Training
CoolGamer48 is offline Offline
401 posts
since Jan 2008
Jan 20th, 2008
0

Re: Where to put d3dx9.h?

>>When you install the August 2007 DirectX SDK, doesn't it make you put the files somewhere?
Only if you select "Save" from the download link., If you do then it doesn't matter where you save it.

If you look in the compiler's Options you should see this in the Include directory (see Post #2 above)
D:\Program Files\Microsoft DirectX SDK (August 2007)\Include

I installed the DirectX SDK some time ago and don't recall if the installed added that line to the compiler or if I added it manually. In any event check your compiler and add the location where you installed the DirectX SDK.
Last edited by Ancient Dragon; Jan 20th, 2008 at 4:45 pm.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is online now Online
21,949 posts
since Aug 2005
Jan 20th, 2008
0

Re: Where to put d3dx9.h?

>>When you install the August 2007 DirectX SDK, doesn't it make you put the files somewhere?
Only if you select "Save" from the download link., If you do then it doesn't matter where you save it.
I am not talking about the dxsdk_aug2007.exe file. When I ran that file, I (for some reason) saved all the files that were in C:\Program Files\Microsoft DirectX SDK (August 2007) to another folder on my desktop as well. When I ran the dxsdk_aug2007.exe again just now, it (once again) brought me to a prompt asking me where I would like to unzip to. I selected a folder on my desktop, and all the files that I just realized were in C:\Program Files\Microsoft DirectX SDK (August 2007) were also put in the folder I put on my desktop.

Now, the problem isn't that the compiler can't find a file - it can't open d3dx9.lib. This is exactly what the compiler says:
------ Rebuild All started: Project: GameTest1, Configuration: Debug Win32 ------
Deleting intermediate and output files for project 'GameTest1', configuration 'Debug|Win32'
Compiling...
Main.cpp
Linking...
LINK : fatal error LNK1104: cannot open file 'd3dx9.lib'
Build log was saved at "file://c:\Documents and Settings\******\My Documents\Visual Studio 2008\Projects\GameTest1\GameTest1\Debug\BuildLog.htm"
GameTest1 - 1 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Now - I have no idea why this error comes up. Apparently the include was automatically setup for you, but not for me, and I don't know why since we ran the same files. Does anyone have any idea why that might be happening?

EDIT: I also tried including the C:\Program Files\Microsoft DirectX SDK (August 2007)\Lib\x64 and x86 directories (where d3dx9.lib is located), but neither of them changed anything (I tried adding them both individually and having them both added at the same time).
Last edited by CoolGamer48; Jan 20th, 2008 at 5:10 pm.
Reputation Points: 77
Solved Threads: 40
Posting Pro in Training
CoolGamer48 is offline Offline
401 posts
since Jan 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: How to detect effeciently file encoding of a text file at runtime?
Next Thread in C++ Forum Timeline: compiling different parts of a calendar





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC