HELP on DirectInput

Started by
1 comment, last by KingSnake 23 years ago
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.
Advertisement
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''

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

Michele.

This topic is closed to new replies.

Advertisement