Advertisement

DirectDraw Simple Question

Started by August 04, 2000 01:18 PM
1 comment, last by SpikyQube 24 years, 4 months ago
I was trying to compile the source code for the directdraw sample programs from the SDK, but i get error messages like this: e:\microsoft directx sdk\samples\multimedia\ddraw\src\ddex2\ddex2.cpp(41) : error C2146: syntax error : missing '';'' before identifier ''g_pDD'' e:\microsoft directx sdk\samples\multimedia\ddraw\src\ddex2\ddex2.cpp(41) : error C2501: ''LPDIRECTDRAW7'' : missing storage-class or type specifiers e:\microsoft directx sdk\samples\multimedia\ddraw\src\ddex2\ddex2.cpp(41) : fatal error C1004: unexpected end of file found which refers to this: //----------------------------------------------------------------------------- // Global data //----------------------------------------------------------------------------- LPDIRECTDRAW7 g_pDD = NULL; // DirectDraw object LPDIRECTDRAWSURFACE7 g_pDDSPrimary = NULL;// DirectDraw primary surface LPDIRECTDRAWSURFACE7 g_pDDSBack = NULL; // DirectDraw back surface LPDIRECTDRAWPALETTE g_pDDPal = NULL; // The primary surface palette BOOL g_bActive = FALSE; // Is application active? Can anyone tell me what i should do? I''m kinda new to directX, Thanks! -Spiky I want to work for Squaresoft ;)
I want to work for Squaresoft ;)
Are the correct DX headers included? Have you linked with the correct libs?
I'm reminded of the day my daughter came in, looked over my shoulder at some Perl 4 code, and said, "What is that, swearing?" - Larry Wall
Advertisement
Make sure your compiler is linked to ddraw.lib, and also that your compiler''s header directory thing is pointed to C:\mssdk\inc and C:\mssdk\lib or whatever they''re called. Also make sure at the beginning of your program do this:

#include
#define INITGUID
#include

To make sure the identifiers are defined.

----------------------------------------

I'm fat, you're ugly. I can lose weight.

------------------------------------

"We are the music makers, and the dreamers of the dreams."
- Willy Wonka

This topic is closed to new replies.

Advertisement