3 errors

Started by
5 comments, last by Nothingness 21 years, 11 months ago
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.
Advertisement
i believe you arent using the correct headers; the compiler is saying LPDIRECTDRAW4 hasnt been defined yet
You also have to link to ddraw.lib and dxguid.lib
[EDIT]Also link with -fvtable and -thunks[/EDIT]

[edited by - Quantrizi on May 5, 2002 8:04:46 PM]
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.
You haven''t properly set up your headers and lib files.

[ 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!
tools->options->directories
In there right? if so, thats where i put them. Is there anyother way of doing it?
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!

This topic is closed to new replies.

Advertisement