Archived

This topic is now archived and is closed to further replies.

GliTch

DirectInput - Undeclared Identifier

Recommended Posts

GliTch    122
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

Share this post


Link to post
Share on other sites
John Reynolds    122
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

Share this post


Link to post
Share on other sites
GliTch    122
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

Share this post


Link to post
Share on other sites