Compiler not recognising DirectX objects/function calls!!!
I''ve included the header and library files and I can''t think of what I''m missing, anyone got any ideas?
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.
on a hunch: include dxguid.lib It''s caused problems for me somewhat like what I think you mean.
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++.
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++.
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]
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]
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?
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?
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
- Andy Oxfeld
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement