Problems with DirectDraw

Recommended Posts

I'm new to programming with DirectX. I installed on my computer DirectX SDK version 9 and I'm using MS Visual C++ 6.0 I'm trying to get a program working, but I allways get an error when I try to compile it. The line where I get the error is this one:
LPDIRECTDRAW7 lpdd = NULL;
And these are the error messages:
error C2146: syntax error : missing ';' before identifier 'lpdd'
error C2501: 'LPDIRECTDRAW7' : missing storage-class or type specifiers
fatal error C1004: unexpected end of file found
I've included ddraw.lib to my win32 project and I declare the #include <ddraw.h> at the beginning of the program, but I can´t get rid of the mistake. Thanks in advance... Tony =8-)

Share on other sites
Does it recognize any older direct draw types, such as LPDIRECTDRAW?

Have you added the SDK include directory to MSVC's list of include paths? Or even included it as an additional include directory of the project?

Personally I like physically include Wine's set of DirectX headers within my own project. They're free and fairly small so it saves a lot of effort when switching between compilers.

Share on other sites
Thank you _very_ much. I didn't include DirectX SDK's path in VC++'s include directories.

Create an account

Register a new account

• Forum Statistics

• Total Topics
628381
• Total Posts
2982360

• 10
• 9
• 15
• 24
• 11