Skip to main content
gamedev.net
🔒 Locked

DirectInput - Undeclared Identifier

Started by GliTch Jul 31, 2001 at 5:42 PM 2 replies 650+ views
Original Post
GliTch
GliTch
I'm having a problem on initializing DirectInput. having included the #include dinput.h and dinput.lib (directories link). when I complied the program, which is a simple window that accept input from a keyboard, I get this error, error C2065: 'DirectInputCreate': undeclared identifier any idea way this happen? thanks... Edited by - GliTch on July 31, 2001 6:44:35 PM
John Reynolds
John Reynolds
I suspect you are using some code written for an earlier version of DirectX and using DX8 to compile it. In DX8, DirectInputCreate changed to DirectInput8Create (Please note the 8 in the function name).

Assuming you are using DX8 then this will be the problem. However, you should be linking to dinput8.lib.

If you do not want the DX8 functionality then you should use DirectInputCreateEx instead, and link with dinput.lib as you are now.

Cheers,
John
John ReynoldsCreative Asylum Ltdwww.creative-asylum.com
GliTch
GliTch
I only got one source file, Midnight Coder

your right (John Reynolds) I'm using DX8, so I need to use DirectInput8Create (duh...).

Thanks guys...



Edited by - GliTch on August 1, 2001 2:17:44 PM

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.