DirectInput - Undeclared Identifier

Started by
2 comments, last by GliTch 22 years, 8 months ago
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
Advertisement
Are you sure you #included it in all source files?
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
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

This topic is closed to new replies.

Advertisement