compiler not finding direct draw

Started by
7 comments, last by jimiwa 20 years ago
I am trying direct draw and the compiler isn''t recognizing direct draw commands. I included ddraw.h and added ddraw.lib and dxguid.lib to my project. My guess is I''m missing a .h or .lib file. Can anyone help?
Advertisement
What compiler are you using? If your using .NET, try including them in stdafx.h. If you are using MinGW, you need .a libs. Also, make sure you have the compiler set up so it looks in the directory you installed DirectX for headers and libs, or else it is just ignoring them. Better yet, move them to your compiler''s directory in your own folder.

Scott Simontis
e-mail:ageofscott@NOSPAM.comcast.net
AIM:ssimontis
Scott SimontisMy political blog
i had problems last week with directdraw aswell. did you write
"#define INITGUID" at the beginning of the program
quote:Original post by simon clynes
i had problems last week with directdraw aswell. did you write
"#define INITGUID" at the beginning of the program

#define INITGUID tells the compiler to link dxguid.lib and jimiwa has already done that.

What are the exact errors you are getting, jimiwa?

Thanks Salsa!Colin Jeanne | Invader''s Realm
"I forgot I had the Scroll Lock key until a few weeks ago when some asshole program used it. It even used it right" - Conner McCloud
I''m going to assume you''re using MSVC? If so, make sure you added your DirectX SDK''s path to it. Your compiler won''t find the libs otherwise.
I am getting undeclared identifiers:
DD_OK
DDSCL_EXCLUSIVE
DDSCL_FULLSCREEN
hwnd
IID_IDirectDraw7

left of ->SetCooperativeLevel must point to class/struct/union
lpDD - missing storage class or type specifiers
LPDIRECTDRAW7 - missing storage class or type specifiers
DD_OK - identifier not found
DirectDrawCreateEx- identifier not found

I am using Visual Studio .net (c++)
I have include path directories set, too.
You say you included ddraw.h to your project, does that mean you are #including them in the files that you use DirectDraw? Your errors indicate that there hasn''t been an #include <ddraw.h> prior to that code.

Thanks Salsa!Colin Jeanne | Invader''s Realm
"I forgot I had the Scroll Lock key until a few weeks ago when some asshole program used it. It even used it right" - Conner McCloud
including them in stdafx.h worked. Thanks.


[edited by - jimiwa on March 29, 2004 7:17:37 AM]
including them in stdafx.h worked. Thanks.

This topic is closed to new replies.

Advertisement