Archived

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

nswan

demo6_1

Recommended Posts

does any body have any solution to my problems with demo6_1 from tricks of the windows game programming gurus. these are the error''s I get. demo6_1.cpp d:\c++ source code\t3dchap06\demo6_1.cpp(58) : error C2146: syntax error : missing '';'' before identifier ''lpdd4'' d:\c++ source code\t3dchap06\demo6_1.cpp(58) : error C2501: ''LPDIRECTDRAW4'' : missing storage-class or type specifiers d:\c++ source code\t3dchap06\demo6_1.cpp(58) : fatal error C1004: unexpected end of file found Error executing cl.exe. demo6_1.exe - 3 error(s), 0 warning(s) Thanks for any help Nick

Share this post


Link to post
Share on other sites
well I don''t know much about directx, but one I bet your not using directx 4 but probably directx 7, so you need to change the references LPDIRECTDRAW4 to like LPDIRECTDRAW7...also make sure your including the correct files and libraries

Share this post


Link to post
Share on other sites
well i typed the program in first, 3 errors. So i copied the original and pasted it, and still the same three errors. I was wondering if anybody who had the book would be able to tell me if there was a fix to this one.

Cheers
Nick

Share this post


Link to post
Share on other sites
quote:
Original post by Pactuul

well I don''t know much about directx, but one I bet your not using directx 4 but probably directx 7, so you need to change the references LPDIRECTDRAW4 to like LPDIRECTDRAW7...also make sure your including the correct files and libraries



actually the directx 7 version of directdraw is directdraw4

Make sure the first directory that your compiler searches for include files is your directx7 include folder. If not the compiler is using an older version of directx.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Yup,
you need to link the files your #including and the .libs that you need, so make sure in your settings that the correct path is set so you can use #include "ddraw.h" otherwise put the entire path if you don''t know how to set it, and you need to link the .lib also im guessing, it''s all in the settings

Share this post


Link to post
Share on other sites