PDA

View Full Version : errors that i shouldnt have...



07-10-2001, 10:01 PM
ok this is odd, im going off of nehe's tutorial #23 and i wrote it out exactly how it was on the page (didnt copy and paste because nothing soaks into your brain that way) im getting the error for the mouse direct input, heres the lines of code im getting the error for,

#include <dinput.h>
LPDIRECTINPUT7 g_DI;
LPDIRECTINPUTDEVICE7 g_KDIDev;

and here are the errors(same errors for the above 2 lines)

error C2146: syntax error : missing ';' before identifier 'g_DI'
error C2501: 'LPDIRECTINPUT7' : missing storage-class or type specifiers
fatal error C1004: unexpected end of file found

im kinda clueless as how to fix this because it is exactly like how he had it, but he got it compiled seome how...

*scratches head*
and if it matters, im using MSVC++ 6.0 pro

07-11-2001, 12:53 AM
mmmkay, i downloaded the C++ version of that tut, and got the same error,

i did however get rid of that particular error by adding,

typedef struct IDirectInput7 *LPDIRECTINPUT7;
typedef struct IDirectInput7 *LPDIRECTINPUTDEVICE7;

but now it has 20 more errors, am i just doing somthing stupid here that im overlooking, or is the tutorial filled with errors?

DFrey
07-11-2001, 03:57 AM
Do you have the DirectX 7 SDK installed and your compiler properly configured to use the DirectX 7 SDK headers and libraries before resorting to its own?

07-11-2001, 03:35 PM
yes i installed the ADK off of a disk, and i configured my compiler how he tells me to in his tutorial, so im really confused now.