• Advertisement
Sign in to follow this  

problems compiling directinput library

This topic is 4850 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

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
Advertisement
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
Sign in to follow this  

  • Advertisement