Jump to content
  • Advertisement

Archived

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

flukus

Compiler not recognising DirectX objects/function calls!!!

This topic is 5820 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''ve included the header and library files and I can''t think of what I''m missing, anyone got any ideas?

Share this post


Link to post
Share on other sites
Advertisement
could you post more details? what are the exact errors?

on a hunch: include dxguid.lib It''s caused problems for me somewhat like what I think you mean.

Share this post


Link to post
Share on other sites
At a line like this:

LPDIRECTDRAWSURFACE7 images[MAX_BOB_FRAMES]; // the bitmap images DD surface

I get the errors :

error C2146: syntax error : missing '';'' before identifier ''images''
error C2501: ''LPDIRECTDRAWSURFACE7'' : missing storage-class or type specifiers
error C2501: ''images'' : missing storage-class or type specifiers

And I''m using VC++.

Share this post


Link to post
Share on other sites
And you have included directdraw.h and imported ddraw.lib and dxguid.lib? Depending on your COM initialization you may or may not need dxguid, but since you are having difficulties you may want to try it if you haven't. If you have done that, those errors would not be occuring...under normal conditions ;-)

Brian

EDIT: Make sure that directdraw.h is included BEFORE the file you are creating the variable from:

#include <directdraw.h>
#include "MyHeader.h"

in fact, try making directdraw.h first (or second to windows.h)

[edited by - bjmumblingmiles on December 8, 2002 9:04:17 PM]

Share this post


Link to post
Share on other sites
what SDK version do you have? I Assume it''s 7 or above.

Just to be sure...see if that line works with just "LPDIRECTDRAW".

you may have your link library folders not set to the folder that the latest versions of ddraw.h/dxguid.h/ddraw.lib are in.
are you sure of that?

Share this post


Link to post
Share on other sites
MS VC++ ships with an old version of the DirectX header/library files. You need to goto Tools | Options, then Directories, and add the path to your DX SDK includes and libraries to the appropriate sections. Also, make sure you use the UP arrows so they are listed on TOP.

- Andy Oxfeld

Share this post


Link to post
Share on other sites
Actually, it does work with just LPDIRECTDRAW.

"you may have your link library folders not set to the folder that the latest versions of ddraw.h/dxguid.h/ ddraw.lib are in.
are you sure of that? "

The only DXsdk I''ve ever had on my computer is DX8.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!