Sign in to follow this  
Mark04

Error with D3D8.h ...

Recommended Posts

Hi. I am trying to compile a basic 3D tutorial and I am getting an error saying Cannot Open Include File D3D8.h. I have searched my whole C drive and there is no file. Does this mean that I need to DirectX SDK (200MB!!) ? Also, if so, will the DX9 DSK contain this D3D8 file. Thanks Mark.

Share this post


Link to post
Share on other sites
The DirectX 9 SDK was around 284MB when I downloaded it. Its a software development kit so the header files would be in there. Also if its DX9 then the header file you're looking for should be called 'D3D9.h'. Also if you're on Windows XP the DX SDK should be somewhere in the platform SDK folder under vc7(if you have the MSVC++.NET IDE/Compiler).

If you're using a free IDE such as Dev-C++4.9 then compiling DirectX example would be close to impossible. Its best that you get a microsoft compiler or consider another graphic API such as OpenGL.

Share this post


Link to post
Share on other sites
if u don't want the complete DX SDK, u may download a much smaller(7.1mb) one which only contains Include&Lib files.
here u get it: http://resource.gameres.com/dx9sdk.zip

by the way, i think u should look for some tutorials for beginners.

Share this post


Link to post
Share on other sites
Quote:
I downloaded the Full DX9 SDK and added it in Link, Include Files.
So you followed the installer correctly, and it reported no errors?

Quote:
I then compile my program and it comes up with 102 errors??
What errors? Can you compile the sample programs? Did you add the libraries to your own personal project?

Quote:
Any idea what I did wrong?
Post a few examples of any common, yet specific, errors and I/we might be able to tell you what the problem is. in the words of Johnny-5 (iirc) "neeeed more eeenput" [wink]

Jack

Share this post


Link to post
Share on other sites
Hi.

OK, just concentrating on getting the sample programs working first.

I setup the include files fine but got the following errors:

c:\program files\microsoft directx 9.0 sdk (october 2004)\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1'

c:\program files\microsoft directx 9.0 sdk (october 2004)\include\dsound.h(305) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers

c:\program files\microsoft directx 9.0 sdk (october 2004)\include\dsound.h(305) : error C2501: 'dwReserved1' : missing storage-class or type specifiers

c:\program files\microsoft directx 9.0 sdk (october 2004)\include\dsound.h(306) : error C2146: syntax error : missing ';' before identifier 'dwReserved2'

c:\program files\microsoft directx 9.0 sdk (october 2004)\include\dsound.h(306) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers

c:\program files\microsoft directx 9.0 sdk (october 2004)\include\dsound.h(306) : error C2501: 'dwReserved2' : missing storage-class or type specifiers

c:\program files\microsoft directx 9.0 sdk (october 2004)\samples\c++\common\dxut.h(13) : fatal error C1189: #error : "The sample framework requires a Unicode build. If you are using Microsoft Visual C++ .NET, under the General tab of the project p
roperties change the Character Set to 'Use Unicode Character Set'."

Any idea why the sample files contain errors and how I can fix these?

Thanks!!

Mark.

Share this post


Link to post
Share on other sites
Hi,

Unfortunately, not the obvious errors I've usually seen/experienced, but I'll see what I can think of...

Quote:
c:\program files\microsoft directx 9.0 sdk (october 2004)\include\dsound.h(305) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
'DWORD_PTR' is a datatype defined as part of the platform SDK. I couldn't find a web link for it, but on my local copy of MSDN in VStudio2002 it lists it as "Unsigned long type for pointer precision. Use when casting a pointer to a long type to perform pointer arithmetic." in the "Platform SDK: Windows API" section.

The other errors (C2146, C2501) are probably directly related. If the compiler doesn't know what DWORD_PTR is then it won't like the rest of the expression.

Quote:
...fatal error C1189: #error : "The sample framework requires a Unicode build. If you are using Microsoft Visual C++ .NET...
If you're using VC++ 2002,2003 or 2005 you can solve this one just by following the error messages advice.


You haven't specified what compiler you're using, or anything much about your system... but, by any chance, are you using VisualC++ 6?

There are known issues about getting VC++6 to accept the later versions of the SDK, and requiring updates to the PlatformSDK. It wasn't DWORD_PTR precisely, but several similar errors occured with beta testers - and in all cases it was solved by upgrading VC6 to the latest service pack (and the latest STL implementation) along with the latest platform SDK.

If you are using VC7 (2002,2003,2005) then you're gonna have to look through the project settings and see if anything stands out as wrong - check the search paths to make sure that the latest files are searched first...

Although, if you're not using VisualStudio, you might have to get someone else's attention - I personally have no experience of using any other C++ IDE's.

hth
Jack

Share this post


Link to post
Share on other sites
Hi!

Thanks for the info.

I got all problems solved now... 0 errors 0 warnings!

I had to download the Extra Library files for the DX9 SDK (October Edition), which I didnt have in the first place.

Mark.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this