Archived

This topic is now archived and is closed to further replies.

TOTWGPG - Andre LaMothe Compilation Errors

This topic is 5901 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I recently purchased Andre LaMothe's book Tricks of the Windows Programming Gurus and I am trying to get the first program to compile. I have added ddraw.lib and dxguid.lib to the Linker Options, set the destinations to look for files, and even manually included ddraw.h and ddraw.lib into the project. But every time I get the same error's: c:\my stuff\source\t3dchap01\blackbox.h(34) : error C2146: syntax error : missing ';' before identifier 'lpdd' c:\my stuff\source\t3dchap01\blackbox.h(34) : fatal error C1004: unexpected end of file found here is the source coad of the header file where the error occurs: extern LPDIRECTDRAW4 lpdd; // dd object extern LPDIRECTDRAWSURFACE4 lpddsprimary; // dd primary surface extern LPDIRECTDRAWSURFACE4 lpddsback; // dd back surface extern LPDIRECTDRAWPALETTE lpddpal; // a pointer to the created dd palette extern LPDIRECTDRAWCLIPPER lpddclipper; // dd clipper extern PALETTEENTRY palette[256]; // color palette extern PALETTEENTRY save_palette[256]; // used to save palettes extern DDSURFACEDESC2 ddsd; // a direct draw surface description struct extern DDBLTFX ddbltfx; // used to fill extern DDSCAPS2 ddscaps; // a direct draw surface capabilities struct extern HRESULT ddrval; // result back from dd calls extern DWORD start_clock_count; // used for timing If someone could show me why this wont work and how to fix it I would really appreciate it. Thanks, BananaAssassin Edited by - BananaAssassin on October 21, 2001 12:57:29 PM

Share this post


Link to post
Share on other sites
MSVC comes with DirectX 3. If you want to use a more modern version, either overwrite those files or set MSVC to look for the files in another directory first . It''s in your Tools->Directories... menu option.

Personally, I recommend overwriting the DX3 files. You''re not going to miss them.



To you it''s a Bently, to me it''s a blue car...
"Diddy"
P.Diddy

Share this post


Link to post
Share on other sites