Archived

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

3 errors

This topic is 5703 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

Im brand new to DirectX, and when i try to just initilize Direct draw, it says "missing '';'' before identifier ''lpdd4''" and no matter what i do, it stays with 3 errors because of that. #include <windows.h> #include <windowsx.h> #include <ddraw.h> LPDIRECTDRAW lpdd = NULL; //here it says the error LPDIRECTDRAW4 lpdd4 = NULL; here are the other errors: C:\Windows\Desktop\DirectX programs\Dx1\DX1.cpp(7) : error C2501: ''LPDIRECTDRAW4'' : missing storage-class or type specifiers C:\Windows\Desktop\DirectX programs\Dx1\DX1.cpp(7) : fatal error C1004: unexpected end of file found Error executing cl.exe.

Share this post


Link to post
Share on other sites
i have linked DirectX libs, and include files, that was the first things i have tried, but no matter what i do, it dosnt read LPDIRECTDRAW4, i have put in LPDIRECTDRAW2(and that worked) LPDIRECTDRAW3(this worked), then i''ve tried LPDIRECTDRAW4/7 and after 3 none worked. I dont no what to do, it dosnt want to read LPDIRECTDRAW4 for nothing. All im trying to do is initilize directX and nothing more, and if its going to be this hard to error check, im in for a ride.

Share this post


Link to post
Share on other sites
Make sure they''re at the top of the list. MSVC comes with DX5 or so headers and libs, and it searches for both headers and libs in the order in which they are listed in that dialog box.

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ ]
[ MS RTFM [MSDN] | SGI STL Docs | Boost ]
[ Google! | Asking Smart Questions | Jargon File ]
Thanks to Kylotan for the idea!

Share this post


Link to post
Share on other sites