Jump to content
  • Advertisement
Sign in to follow this  
ArgusMaker

[DX9 C++] Direct Input

This topic is 2587 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

Hi there!
I have a problem with DirectInput8Create, my compiler does not recognize it as a defined function, but i included dinput.h...
What should i do? ;)

Share this post


Link to post
Share on other sites
Advertisement
Don't you also need to include the "dinput8.lib"?

You can do this with the following line:

#pragma comment (lib, "dinput8.lib")


EDIT: Sorry, I thought this was necessary, but I just tested it and it seems it isn't.

Share this post


Link to post
Share on other sites
Check the version of the DirectX SDK you're using and make sure that it's (reasonably) up to date then.

Share this post


Link to post
Share on other sites
This is what I have at the start of my Direct Input class and the function calls work ok for me.

Hope this helps.

#pragma once
#define DIRECTINPUT_VERSION 0x0800

#include<Windows.h>
#include<dinput.h>

#pragma comment(lib,"dinput8.lib")
#pragma comment(lib,"dxguid.lib")


[EDIT] The SDK version shouldn't matter too much. Some of my projects use 'DX Summer 2003 SDK' and others use the latest DX SDK. Both work fine for me. ;)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!