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?
[DX9 C++] Direct Input
Don't you also need to include the "dinput8.lib"?
You can do this with the following line:
EDIT: Sorry, I thought this was necessary, but I just tested it and it seems it isn't.
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.
Check the version of the DirectX SDK you're using and make sure that it's (reasonably) up to date then.
This is what I have at the start of my Direct Input class and the function calls work ok for me.
Hope this helps.
[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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement