[DX9 C++] Direct Input

Started by
7 comments, last by Evil Steve 12 years, 10 months ago
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? ;)
Advertisement
#define DIRECTINPUT_VERSION 0x0800 before including dinput.h

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

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.
TGUI, a C++ GUI for SFML
texus.me
I've already tried with the define and linking the lib but the error persists..
Check the version of the DirectX SDK you're using and make sure that it's (reasonably) up to date then.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

my sdk should be the latest, june 2010
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. ;)
have you tried DIRECTINPUT_VERSION ?

Never say Never, Because Never comes too soon. - ryan20fun

Disclaimer: Each post of mine is intended as an attempt of helping and/or bringing some meaningfull insight to the topic at hand. Due to my nature, my good intentions will not always be plainly visible. I apologise in advance and assure you I mean no harm and do not intend to insult anyone.

What is the *exact* error message you get?

This topic is closed to new replies.

Advertisement