error C2065: 'DirectInputCreate' : undeclared identifier

www.mvps.org/directx/faq/directx_general_issues.htm#dinputcreate

Q. When attempting to compile under the DirectX 8 SDK, I recieve a compiler error stating that  DirectInputCreateEx or DirectInputCreate is an undeclared identifier.

Compiling code for previous versions of DirectInput under DirectX 8, you must define a constant specifying the required version support prior to including dinput.h.  Define DIRECTINPUT_VERSIONto be equal to 0x3000x0500, or 0x0700, like this:

#define DIRECTINPUT_VERSION 0x0700
#include <dinput.h>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章