## Recommended Posts

Hi, ive been programming in C++ for about 1-2 months now and have managed to create a fully functiona, supposedly bugless pong clone using the windows SDK and the GDI for my graphics. I now want to learn how to use the DirectX API. Ive found a good site where i can teach myself the API from looking at examples with commented source code. All i need to know now is which version of the DirectX SDK do i download? I ran the "dxdiag" thing and it said tht my operating system is runing directX 10, but i read on MSDN that DirectX 10 is only available for windows vista users (i of course am running the windows vista OS). I want my applications to be "portable", many of my frinds who i will be sharing code with are have Windows XP. So which version of the SDK should i download to enure that my directX applications will run on vista and XP? Thanks! ~Reegan PS: Ive heard that once the SDK is installed on your system you cant remove it easily so thats why im asking to make sure i get the right one :)

##### Share on other sites
Quote:
 Original post by ReeganPS: Ive heard that once the SDK is installed on your system you cant remove it easily so thats why im asking to make sure i get the right one :)
The SDK is easy to remove, but you can't downgrade DirectX. So if you have the latest SDK and you then uninstalled it and tried to install the December 2004, the latest DirectX runtimes will remain on your computer. Not that that's a bad thing, mind - the older SDK would still work fine with the newer runtimes since DirectX is backwards compatible.

##### Share on other sites
Ok, thanks guys.

Just one more thing if you wouldnt mind, provide a link to the latest DirectX SDK and an article which would explain how to set it up ready for use. :D

That would be a great help!

Thanks again.

##### Share on other sites
I thought MS were only offering the last 3 versions of things for download, but from a quick search I can see 6 on the first page alone [lol]

Anyway, in addition to the other replies you should bare in mind that the SDK has changed slightly over the years. D3D9 has been pretty much static since the first releases of D3D10 over a year ago, so you're probably fine there. But if the tutorials you're referring to were written in the 2003-2006 timeframe it is quite possible there will be slight interface changes and different flags for D3DX-related components.

This shouldn't stop you using the tutorials, but it will potentially stop you being a copy-n-paste coder, which is a good thing [grin]

Best of luck!
Jack

##### Share on other sites
Quote:
 Original post by ReeganOk, thanks guys.Just one more thing if you wouldnt mind, provide a link to the latest DirectX SDK and an article which would explain how to set it up ready for use. :DThat would be a great help!Thanks again.
It's just a library. You set it up like any other. You point your compiler settings to the include and library folders.

http://msdn.microsoft.com/en-us/directx/default.aspx

##### Share on other sites
EDIT: getting slow in my old age... [headshake]

Quote:
 Original post by ReeganJust one more thing if you wouldnt mind, provide a link to the latest DirectX SDK and an article which would explain how to set it up ready for use. :D

It should handle all of the necessary IDE configurations, but if you get any problems then be sure to check the VC++ directories to ensure the 'include' and 'lib' folders are in the list.

hth
Jack

##### Share on other sites
You was right, i managed to setup the directx but when it came to doing the tutorial and then compiling it my compiler sprewed erros all over the place

I dont know whether its because i done it wrong or something but it didnt work and the tutorial was from 2004 :P

Ive tried searching around for tutorials (specifically for DirectSound) bu they are either old or not very informative of what im trying to learn (msdn in particular is the worst place for me to leanr anything about programming).

What should a guy like me do in a situation like this? bearing in mind i have no money to get a book, nore do i know which one would be right for me :)

##### Share on other sites
Quote:
 Original post by ReeganYou was right, i managed to setup the directx but when it came to doing the tutorial and then compiling it my compiler sprewed erros all over the placeI dont know whether its because i done it wrong or something but it didnt work and the tutorial was from 2004 :P Ive tried searching around for tutorials (specifically for DirectSound) bu they are either old or not very informative of what im trying to learn (msdn in particular is the worst place for me to leanr anything about programming).What should a guy like me do in a situation like this? bearing in mind i have no money to get a book, nore do i know which one would be right for me :)
Can we see the errors? DirectSound shouldn't have changed much, but D3DX will have.

##### Share on other sites
Ive deleted them now, they constantly was changing. but the main one that i couldnt get rid of was something wrong with my "resource.h"

ERROR: Unexpected end of file

That was the only error in the end.
The only piece of code that header file contained was
#define SND_BOUNCE          101

The ID for my bounce sound?

##### Share on other sites
Quote:
 Original post by Evil SteveThe SDK is easy to remove, but you can't downgrade DirectX. So if you have the latest SDK and you then uninstalled it and tried to install the December 2004, the latest DirectX runtimes will remain on your computer. Not that that's a bad thing, mind - the older SDK would still work fine with the newer runtimes since DirectX is backwards compatible.

Allow me to get up on my soapbox and underline this reply. This backwards compatibility means you get to pick your SDK version now and can happily develop with it for years, meaning you don't have to upgrade to newer versions. It's probably painfully obvious, but I used to constantly update my SDK and rework my code when I just got started, so this might save you some aggravation [smile]

##### Share on other sites
What was the exact error? That doesn't sound like a SDK problem at all, more a problem with your resource file.

##### Share on other sites
Ive never used DirectX or anything similar to it before this is my first time (complete beginner!)

what i really need is some clear tutorials that will teach me how to make a simple sound play once and then stop with each part of the tutorial and the function used gven a brief explanation on whats going on.

Usually tutorials look like this:

You must first apply the JIBJABJUB( LPSTRC ch , BLA bla ) function before you can do such and such

code -
//Ton of code which i have completely no idea what any of its doing!
//.........
code -

....

EDIT: @evil steve - Yes that was the error and yes there is something wrong with my resource.h file

[resource.h code]
#define SND_BOUNCE 101

[resource.rc code]
#include "resource.h"
SND_BOUNCE WAV "bounce.wav"

##### Share on other sites
Describe what it is you're trying to do and maybe we can help out.

However, if you're familiar with C and C++ then think about your code
#define SND_BOUNCE 101SND_BOUNCE WAV "bounce.wav"

That's the equivalent of
101 WAV "bounce.wav"

and your compiler doesn't know what to do with it.

EDIT: if you're getting an "unexpected EOF," it sounds like you have "precompiled headers" turned on and don't include "stdafx.h" in your CPP file.

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628333
• Total Posts
2982130

• 24
• 9
• 9
• 13
• 11