Skip to main content
gamedev.net
🔒 Locked

Direct Input problem

Started by scourge99 Jan 10, 2007 at 7:28 PM 0 replies 600+ views
Original Post
scourge99
scourge99
I am using Microsoft Visual Studio 6.0. I am trying to create a DirectInput object using the DirectInput8Create function. However I am stuck on this error "error LNK2001: unresolved external symbol _IID_IDirectInput8A" The code I am using is LPDIRECTINPUT lpdi=NULL; if(FAILED( DirectInput8Create(GetModuleHandle(NULL), DIRECTINPUT_VERSION, IID_IDirectInput8 , (void**)&lpdi, NULL) )) { return E_FAIL; // error code } From looking at other forums with this problem the solution seems to deal with linking correctly. I am using DirectX 9.0 SDK (February 2005). Under Project->Settings->Link i have included dinput.lib dinput8.lib dxguid.lib and under Tools->Options->Directories i have included the source files for DirectX. I have also included "#include " in the code. Anyone have any suggestions that may solve this problem? [Edited by - scourge99 on January 10, 2007 7:46:27 PM]
scourge99
scourge99
Found the problem. Apparently Visual Studio has many of the same files as DirectX. They both have a dinput.lib and a dxguid.lib. Visual Studio was linking to its own library files rather than using DirectX's files.

Topic Locked

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

Sign in to reply to this topic.