Skip to main content
GameDev.net gamedev.net
🔒 Locked

HELP on DirectInput

Started by KingSnake Apr 26, 2001 at 3:07 AM 1 replies 500+ views
Original Post
KingSnake
KingSnake
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.
Thibault
Thibault
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''

KingSnake
KingSnake
THAAANKS! It works (i had also to link dxguid.lib)
But, why isn''t it automatical, like the others .lib?

Michele.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.