| View previous topic :: View next topic |
| Author |
Message |
Henley Grandmaster Cheater
Reputation: 0
Joined: 03 Oct 2006 Posts: 671
|
Posted: Sun Sep 20, 2009 4:41 pm Post subject: Undefined DirectInput8Create? |
|
|
I've already included dinput.h
and also defined DIRECTINPUT_VERSION as 0x800
| Code: | hr = DirectInput8Create(g_hinst, DIRECTINPUT_VERSION,
IID_IDirectInput8, (void**)&g_lpDI, NULL); |
Errors:
| Code: | [BCC32 Error] Unit2.cpp(40): E2268 Call to undefined function 'DirectInput8Create'
[BCC32 Error] Unit2.cpp(41): E2451 Undefined symbol 'IID_IDirectInput8' |
Any idea/solutions?
|
|
| Back to top |
|
 |
smartz993 I post too much
Reputation: 2
Joined: 20 Jun 2006 Posts: 2013 Location: USA
|
Posted: Sun Sep 20, 2009 8:29 pm Post subject: |
|
|
| You should probably include dinput.h
|
|
| Back to top |
|
 |
Deltron Z Expert Cheater
Reputation: 1
Joined: 14 Jun 2009 Posts: 164
|
Posted: Mon Sep 21, 2009 3:06 am Post subject: |
|
|
Did you define DirectX version before including dinput.h?
| Quote: | To create a DirectX 8.x interface with the latest DirectX SDK without using CoCreateInstance:
1. Set "#define DIRECTINPUT_VERSION 0x0800" before the include statement for Dinput8.h.
2. Call DirectInput8Create instead of DirectInputCreateEx.
3. Link to the Dinput8.lib library instead of Dinput.lib. |
http://msdn.microsoft.com/en-us/library/bb219686%28VS.85%29.aspx
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Mon Sep 21, 2009 11:59 am Post subject: |
|
|
| If you are making a game or something, you'll probably find raw input a much better alternative.
|
|
| Back to top |
|
 |
Henley Grandmaster Cheater
Reputation: 0
Joined: 03 Oct 2006 Posts: 671
|
Posted: Mon Sep 21, 2009 9:55 pm Post subject: |
|
|
I've already defined DIRECTINPUT_VERSION as 0x800
and also included Dinput.h
I had erors linking Dinput8.lib though
Edit: I googled the files online and found Dinput8.h and Dinput8.lib.
Will test it out later and post results here.
|
|
| Back to top |
|
 |
Mozilla Firefox Grandmaster Cheater Supreme
Reputation: 0
Joined: 06 Feb 2007 Posts: 1250
|
Posted: Thu Sep 24, 2009 7:08 pm Post subject: |
|
|
| If you had errors linking, you should check your include and library files paths. And are you still encountering issues regarding this?
|
|
| Back to top |
|
 |
|