Jump to content
  • Advertisement


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


Direct Input problem

This topic is 5358 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello All, I''m currently experimenting with direct input. I have included the neccisarry header files and library files (dinput.h, dinput8.lib, dxguid.lib) however I recieve an odd linker error when I compile my program:
MainApp.obj : error LNK2001: unresolved external symbol _IID_IDirectInput8A
Debug/MainApp.exe : fatal error LNK1120: 1 unresolved externals
I know this is typically resolved by including the required library files in your project, but from all the books and tutorials i''ve read, I am including everything that needs to be included. Here is my source:
IDirectInput8 * lpDI;

// GetHINST returns a copy of winMain''s hInstance

if(FAILED(DirectInput8Create(GetHINST(), DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&lpDI, NULL)))
		return E_FAIL;

Anyone know what could be causing the problem? Thanks in advance! ¬_¬

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
Thanks, I was having that problem too. What does that actually do though? I have a GUID for the app:

//Uniquely identifies this application to direct input
const GUID g_guidApp = { 0x3afabad0, 0xd2c0, 0x4514, { 0xb4, 0x7e, 0x65, 0xfe, 0xf9, 0xb5, 0x13, 0x2b } };

But I still needed to add the #define INITGUID to make it work.
However I''ve linked many times before on other projects without having to have that initguid define...

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!