Archived

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

KingSnake

HELP on DirectInput

Recommended Posts

I have now installed the directx8 sdk, and i am following the tutorials found in it. I am trying to add a keyboard or joystick device, and i have followed the steps (i think) correctly. But at an early stage, inserting the line: #include #include #include LPDIRECTINPUT8 g_pDI = NULL; LPDIRECTINPUTDEVICE8 g_pMouse = NULL; ... ... hr = DirectInput8Create(GetModuleHandle(NULL) , DIRECTINPUT_VERSION, IID_IDirectInput8, (VOID**)&m_pDI, NULL ); the compiler (visual studio 6) gives the following message: Linking... Textures.obj : error LNK2001: unresolved external symbol _DirectInput8Create@20 Textures.obj : error LNK2001: unresolved external symbol _IID_IDirectInput8A Debug/Textures.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. WHY? I need HELP!!! Michele.

Share this post


Link to post
Share on other sites
You''re not the first one to ask that question, and it''s already been answered a few times.

You need to link with the direct input dll.
i.e under VC6 :
Projects/Setting.
Select the ''Link'' Tab,
add dinput8.dll to the ''Object/Library Modules''

Share this post


Link to post
Share on other sites