Skip to main content
gamedev.net
🔒 Locked

Problem

Started by Chimaera Jan 6, 2002 at 3:21 PM 1 replies 550+ views
Original Post
Chimaera
Chimaera
I''ve been having this same problem for awhile and everything I''ve tried hasn''t been able to fix it, so I''m hoping I''ll get some helpful tips here. (Using MSVC++ 6 Intro.. ) Let''s say I have a project named "game". That project has in it a source file "gamemain.cpp" which contains (for right now) a window which draws a bitmap with all the works. In it''s includes, amongst other things gamemain has #include "ddraw.h" Thus, in the project''s header files folder is ddraw.h. When I try to compile the project, I get the following: gamemain.cpp(63) : error C2065: ''LPDIRECTDRAWSURFACE4'' : undeclared identifier gamemain.cpp(63) : error C2146: syntax error : missing '')'' before identifier ''lpdds'' gamemain.cpp(63) : error C2059: syntax error : '')'' gamemain.cpp(83) : error C2146: syntax error : missing '';'' before identifier ''lpdd4'' gamemain.cpp(83) : error C2501: ''LPDIRECTDRAW4'' : missing storage-class or type specifiers gamemain.cpp(83) : fatal error C1004: unexpected end of file found Error executing cl.exe. Help me?? // chimaera
superpig
superpig
1) Which version of DirectX are you trying to write for? The most recent DirectDraw interfaces are *7*, not 4.
2) You probably mean:
#include <ddraw.h>
i.e., with <> rather than ""
3) Make sure that your headers are in the search paths.

If it still doesn''t work come back.

Superpig
- saving pigs from untimely fates
- sleeps in a ham-mock at www.thebinaryrefinery.cjb.net
Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse
B-Barlow
B-Barlow
Make sure you've done the following:

1) Install the DirectX SDK. If you haven't done so, you can get it at microsoft.com.

2) Add ddraw.lib and dxguid.lib to the project. To do so, select 'settings...' from the project menu in VC++. on the dialog which pops up click the link tab. Add those two files to the end of the list in the 'Object/library modules' text box.



Edited by - B-Barlow on January 6, 2002 4:32:22 PM

Topic Locked

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

Sign in to reply to this topic.