Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

merwin

'LPDIRECTDRAW4' : missing storage-class

This topic is 6102 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve bought a book which desribes direct X. I understand some basic stuff but if I try to make use of the newest classes I won''t succeed. If I try to compile a source which comes with the cd I get the error-message: ''LPDIRECTDRAW4'' : missing storage-class or type specifiers ''LPDIRECTDRAW'' is recognized bij the compiler (visual c++, with direct X 6.1), In the source which comes with the cd ddraw.h is included and the workspace has the libaries ddraw.lib and dxguid.lib. I already spended much time to find the cause but I won''t succeed in that. I''ve changed anything special in vc++ so at this moment of typing I''ve absoluteley no idea what''s wrong. I hope that someone could tell what''s (possible) cause or sollution. Merwin

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I doubt that there is no directdraw4 interface in directx 6.1 at all. try LPDIRECTDRAW3 or LPDIRECTDRAW2 or using newer directx.

i just wonder why people still keep on programming with directx 6/7 and directdraw... move on to directx 8!! i think it''s much easier..

Share this post


Link to post
Share on other sites
I think that ''LPDIRECTDRAW4'' excists, otherwise the book ''Tricks on the Windows Game Programming gurus'' wouldn''t make an example of how to use the ''at that time'' newest version of Direct X. Also in ddraw.h i found this lines of code:

typedef struct IDirectDraw4 FAR *LPDIRECTDRAW4;

The reason I use direct X 6.1 is that this version is desribed in the book I bought.

Merwin van Dijk

Share this post


Link to post
Share on other sites
never use macro definations.

read the docs

use
#define DIRECTDRAW_VERSION versionnumber
(check the ddraw.h header for more info)

directdraw4 was meant for wince and pdas, i am not sure if any of the video hardware vendors support that interface in there drivers. if you do use it and get it to work, dont expect it to work on other ppls pcs unless you test it.

Share this post


Link to post
Share on other sites
Just a couple of quick comments here...
First of all, Merwin, check your include folder listing in VC. Make sure that the SDK includes are above the VC include folders. Otherwise the standard includes that are included will override the SDK includes. (You can find them under Tools -> Options [Directories].
Second, if I remember correctly DirectDraw4 objects were part of DX6 (maybe 7) and they were not made for wince or palms... They were a major part of it.
Third, not to start a flame war here, but there is nothing wrong with not using DX8. Starting with 6 or 7 to learn 2D is a much better idea in my mind that to jump right into 3D with DX8. Now if you want to learn 3D, I don''t think you should learn all of the interfaces to 6 or 7... They are to different from 8... But I digress... If you buy a book on 6 or 7, learn it. Then when you are comfortable, move on to 8. And that''s if you want to. Personally I do a lot of 2D games. So I''m still using 7. It''s just easier to use it for 2D. However, I''m also learning 8 right now to do some 3D. They each have their uses.

$.02

Always remember, you''''re unique. Just like everyone else.

Share this post


Link to post
Share on other sites
If I put the SDK includes above the VC includes folders the source can be compiled. Tnx Greven for your reply!!! Still there''s one problem I can''t solve myself. If I declare the directdraw pointers:


LPDIRECTDRAW lpdd = NULL;
LPDIRECTDRAW4 lpdd4 = NULL;


and I use lpdd-> I can see a scrolldown-menu with all function the directdraw object has. If I use lpdd4-> this scrolldown-menu doesn''t appear. This menu is a very skillful tool for me because it gives al lot of information of the function the dd-object has.
Also it''s saves typing and prevent me from making any type-errors. Is there a possibility to solve this problem?

PS: A DDSURFACEDESC2 object doesn''t give a scrolldown-menu neither. While a DDSURFACEDESC object shows me this menu this menu...


Share this post


Link to post
Share on other sites

That''s a fun problem. And from what I have found, it doesn''t have a real solution. The thing that does that (is it called Code Complete? I don''t remember...) doesn''t always work. If it''s an external SDK sometimes it will show the drop down, other times it will not. I use a certain SDK extensively, and sometimes I get the drop down, most other times nothing. I think their are 3rd party programs to replace the one built in to VC, but I''ve never bothered with them...

Always remember, you''''re unique. Just like everyone else.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!