Archived

This topic is now archived and is closed to further replies.

mbachman

Direct Input Incorporation

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites