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?

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.

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.

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.

Update: I just successfully compiled and ran the same program "Animation Showcase" without any problems at all. No compiler warnings or errors.

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?

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.

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?

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?

>>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.

>>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).

>> I also tried including the C:\Program Files\Microsoft DirectX SDK (August 2007)\Lib\x64 and x86 directories (where d3dx9.lib is located),

Where did you add those paths? They should be in the "Library Files" tab, as shown in this thumbnail

>> I also tried including the C:\Program Files\Microsoft DirectX SDK (August 2007)\Lib\x64 and x86 directories (where d3dx9.lib is located),

Where did you add those paths? They should be in the "Library Files" tab, as shown in this thumbnail

Yay! Thank you - it worked now (I was putting the library directories in the includes tab). I don't know why all this stuff wasn't done automatically - but I don't really care as long as it works. Thanks a bunch!! :)

/facepalm. good 4 u. u should have known better. it doesn't take a genius to figure out that .lib file include directories should be located under library files.

commented: Now slap yourself silly for bumping a thread that's been dead for 18 months -7
commented: Rude +0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.