ddraw.h

Started by
6 comments, last by RichS 23 years, 5 months ago
I have the book Teach yourself DirectX7 in 24 hours. I am trying to compile a sample project using MSVC++ 6.0. I get a compile error because it can''t find the definition "LPDIRECTDRAW4". I think it is in ddraw.h. The version of ddraw.h is; "Copyright (C) 1994-1997 Microsoft Corporation". It is in the ..\VC98\include directory. Where do I get an updated version of this header file? And are there other headers that need updating? Thanks, RichS
Advertisement
Visual C++ 6.0 only comes with DirectX 3 headers (I believe) and so seeing as you are trying to compile a DirectX 7 program, you need the DirectX 7 headers. You can download the DirectX 7 SDK at:

http://www.microsoft.com/directx

but it is rather large at ~129MB. You can order the CD though from them, but you''d have to read the info on the site for that.

regards

Jx
LPDIRECTDRAW4 is from DirectX 6. You''ll need updated code from the author. Try finding a link to his site from the publisher''s site. I think it''s only the first few hours that have this problem.
VC++ 6 comes with DX 5 actually. Anyways, you can get the latest DirectX SDK libs and headers, version 7 as we "speak", from Microsoft''s website. These aren''t that big...header + libs + docs is less than 10 mb I''m sure.

"Paranoia is the belief in a hidden order behind the visible." - Anonymous
Staffan, I stand corrected - thanks.

Hope this all helps you RichS

Jx
Suddenly a even better idea struck me...install the SDK from the CD that hopefully came with the book It MUST be on it...perhaps not the latest version but a version new enough to compile the code within the book.

"Paranoia is the belief in a hidden order behind the visible." - Anonymous
In addition to this don''t forget to add the DirectX libs into your project file. They are in the lib folder inside your SDK folder. What exactly you need to include depends on what parts of DirectX you are using.

Usually you''d want to have at least ddraw.lib and d3dx.lib but you might also need the other ones as well.

OD

Thanks, I found my problem.

RichS

This topic is closed to new replies.

Advertisement