Sign in to follow this  
skynethk

problems compiling directinput library

Recommended Posts

skynethk    122
Im having trouble compiling the header file for my directInput functions that i plan on including in my program. The error i keep getting is: error C2146: syntax error : missing ';' before identifier 'lpdi' fatal error C1004: unexpected end of file found The code for the header file is: #ifndef inputHasBeenIncluded #define inputHasBeenIncluded #include <stdlib.h> #include <ddraw.h> #include <dinput.h> #include <math.h> int inputInit(void); void inputShutdown(void); int inputInitMouse(void); int inputInitKeyboard(void); int inputReadMouse(void); int inputReadKeyboard(void); void inputReleaseMouse(void); void inputReleaseKeyboard(void); extern LPDIRECTINPUT8 lpdi; extern LPDIRECTINPUTDEVICE8 lpdikey; extern LPDIRECTINPUTDEVICE8 lpdimouse; extern UCHAR keyboard_state[256]; extern DIMOUSESTATE mouse_state; #endif Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites
circlesoft    1178
Your LPDIRECTINPUT8 lpdi; declaration seems to be right, and you are including dinput.h.

Is the DX8 or DX9 SDK include directory in your list of include directories in Visual Studio? If it isn't, you could be including an older version that doesn't have the needed declarations.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this