   Get Dir. X working?
  I dont know much programming, just the most simple commands. Im trying to follow the very first DirectX examples with ddraw.h and ddraw.lib I found in a book called "Windows Game programming for dummies" by André Lamothe. And Im really dumb so... I have taken time to install DirectX Sdk so I expected it to work from the instructions by the book. But I get a bunch of errors at a row that looks like:LPDIRECTDRAW7 lpdd;   // pointer to direct draw objecterror C2146: syntax error : missing ';' before identifier 'lpdd'error C2501: 'LPDIRECTDRAW7' : missing storage-class or type specifiersfatal error C1004: unexpected end of file foundI just downloaded and installed a version of DxSDK, and I run Visual C++ 6 on winXP. What does the compiler want from me?   
Quote:error C2146: syntax error : missing ';' before identifier 'lpdd'What happens if you change LPDIRECTDRAW7 to LPDIRECTDRAW ?Acording to the error the compiler dont recognize LPDIRECTDRAW7.What version of DX SDK did you install ?Quote:fatal error C1004: unexpected end of file foundMake sure you dont miss any brackets anywhere in the code   ;  I've already tried "LPDIRECTDRAW" but i get even more errors with undeclared identifiers and warnings. I dont think I have missed any brackets because this is an example from the disc that came with the book.The version I installed is called Ms DirectX SDK (April 2006), and I just downloaded it from microsoft. It feels like my Visual C++ dosent understand that I have installed Sdk. Ive also noticed that I have to choose what user I should log in to WinXP since I installed SDK, but there is only one user to log in with.;  Without more info I have to guess...Make sure you have#define INITGUID#include <ddraw.h>somewhere at the top of the file   ;  ddraw.h is includedI use msvc++ 6.0.But microsoft products have a way of never work.   ;  define INITGUID & include <ddraw.h> is there   ;  Thats strange indeed.I wrote this test and it compiled fine:#define INITGUID#include <ddraw.h>int WINAPI WinMain(HINSTANCE hinst, HINSTANCE hprevinst, LPSTR cmd, int show){LPDIRECTDRAW7 lpdd;return 0;}I opened ddraw.h and searhed for LPDIRECTDRAW7:...typedef struct IDirectDraw7   FAR *LPDIRECTDRAW7;...Maybe you should check if you find it too   ;Quote:Original post by slutbitddraw.h is includedI use msvc++ 6.0.But microsoft products have a way of never work.Are you sure you are correctly linking to the DDraw library files as well?   ;  "Are you sure you are correctly linking to the DDraw library files as well?"no, thats where I think the problem is. I was in the menu - settings - Link, and wrote ddraw.lib where theres a bunch of other .lib files. So I thought I had linked it, is there more to do?   ;  I tried them rows pulpfist. I got the exact same errors as last time.   