Direct Input Incorporation

Started by
3 comments, last by mbachman 21 years, 9 months ago
After following common procedures for including the DirectInput component of DirectX in a project, several compile errors are being listed for the header file. After searching for possible reasons to this problem, I am out of answers. I checked all of the paths to my DirectX include and lib directories, and made sure to download the latest version of DirectX. Please tell me I don''t have to debug Microsoft''s code now! - Please Help! **Code Snippet** ---------------- >>/********** DEFINES **********/ >>#define DIRECTINPUT_VERSION 0x0800 >>#define IS_USEKEYBOARD 1 >>#define IS_USEMOUSE 2 >> >> >>/********** INCLUDES **********/ >>#include <dinput.h> <--------- HERE --- **Compile Errors** ------------------ D:\Programming\DXSDK\include\dinput.h(646) : error C2501: ''UINT_PTR'' : missing decl-specifiers D:\Programming\DXSDK\include\dinput.h(646) : error C2146: syntax error : missing '';'' before identifier ''uAppData'' D:\Programming\DXSDK\include\dinput.h(646) : error C2501: ''uAppData'' : missing decl-specifiers D:\Programming\DXSDK\include\dinput.h(658) : error C2501: ''UINT_PTR'' : missing decl-specifiers D:\Programming\DXSDK\include\dinput.h(658) : error C2146: syntax error : missing '';'' before identifier ''uAppData'' D:\Programming\DXSDK\include\dinput.h(658) : error C2501: ''uAppData'' : missing decl-specifiers D:\Programming\DXSDK\include\dinput.h(1056) : error C2501: ''UINT_PTR'' : missing decl-specifiers D:\Programming\DXSDK\include\dinput.h(1056) : error C2146: syntax error : missing '';'' before identifier ''uData'' D:\Programming\DXSDK\include\dinput.h(1056) : error C2501: ''uData'' : missing decl-specifiers D:\Programming\DXSDK\include\dinput.h(1209) : error C2501: ''UINT_PTR'' : missing decl-specifiers D:\Programming\DXSDK\include\dinput.h(1209) : error C2146: syntax error : missing '';'' before identifier ''uAppData'' D:\Programming\DXSDK\include\dinput.h(1209) : error C2501: ''uAppData'' : missing decl-specifiers main.cpp END
Advertisement
include <basetsd.h> before dinput.h.

---
Come to #directxdev IRC channel on AfterNET
Hey Thanks!

What does that library do (basetsd.h)?



END
It defines some Win32 types that newer headers require. You most likely have an old Platform SDK, or never updated it at all. Look inside and see for yourself.

---
Come to #directxdev IRC channel on AfterNET
Thanks again.

This topic is closed to new replies.

Advertisement