Skip to main content
gamedev.net
🔒 Locked

Help?

Started by Chimaera Dec 30, 2001 at 11:51 AM 1 replies 200+ views
Original Post
Chimaera
Chimaera
Okay, so I''m not used to Microsoft VC++, but I''ve decided to start working on my first DirectX game, and the compiler I normally use (Dev-C++) probably isn''t the greatest thing to do that with, right? Based on that, I''m willing to give in and start using the industry standard, just so I can actually get something running. I''ve got code (the details of which shouldn''t matter because, it''s just a template with a little bit of bitmap drawing code). Basically, I just want to draw something to my window, and I need DirectDraw to do it. As far as I can figure - and I haven''t done that much playing around with it - I need to open a new workspace for a Win32 application and put my code in there. Done. Now, I need the DirectDraw libraries, or at least some header files, right? I''ve tried including those (ddraw.h and ddraw.lib) and each time I come up with: game.cpp(65) : error C2065: ''LPDIRECTDRAWSURFACE4'' : undeclared identifier game.cpp(65) : error C2146: syntax error : missing '')'' before identifier ''lpdds'' game.cpp(65) : error C2059: syntax error : '')'' game.cpp(85) : error C2146: syntax error : missing '';'' before identifier ''lpdd4'' game.cpp(85) : error C2501: ''LPDIRECTDRAW4'' : missing storage-class or type specifiers game.cpp(85) : fatal error C1004: unexpected end of file found Error executing cl.exe. Seeing as those errors are all associated with DDraw objects, I''m guessing it''s because I''m missing something. What can I do? // chimaera
eldee
eldee
ok, for starters- posting every 3 minutes isn''t going to get you
any more help...

quote:
Original post by Chimaera
game.cpp(65) : error C2065: ''LPDIRECTDRAWSURFACE4'' : undeclared identifier
game.cpp(65) : error C2146: syntax error : missing '')'' before identifier ''lpdds''
game.cpp(65) : error C2059: syntax error : '')''
game.cpp(85) : error C2146: syntax error : missing '';'' before identifier ''lpdd4''
game.cpp(85) : error C2501: ''LPDIRECTDRAW4'' : missing storage-class or type specifiers
game.cpp(85) : fatal error C1004: unexpected end of file found
Error executing cl.exe.



well, in addition to including the *.h files, you need to
include their library files.
you need to include ddraw.lib, and dxguid.lib, and anything
else you''re using (dinput, ect..).
9 times out of 10 people forget dxguid...



-eldee
;another space monkey;
Facehat
Facehat
Also, when you add the paths for the DirectX headers and librarys, make certain you place them at the *top* of the list. VC++ has an older version of the headers/libs, and it will include those instead unless you tell it to look in the DX folders first.

----------------------------------
AIM: IanWinsAgain ICQ: 60635592 TIM: FaceHat
FaceHat Software -- Wear the hat.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.