Skip to main content
GameDev.net gamedev.net
🔒 Locked

DirectInputCreate(..) undeclared identifier

Started by deadlydog Feb 12, 2003 at 1:54 AM 2 replies 3.7k views
Original Post
deadlydog
deadlydog
Hi, I''m using MSVC++ 6 and when I try and compile demo 9.1 from my tricks of the windows game programming gurus book, I get the error error C2065: ''DirectInputCreate'' : undeclared identifier I have the dinput.h and dinput.lib included in my project, as well as #define INITGUID at the start of my program, and dxguid.lib, winmm.lib, ddraw.lib, ddraw.h all included in my project as well. When I type in DirectInputCreate( myself it brings up the functions protocol above so I know that the function is being recognized. Anybody have any ideas why I''m getting that error. - Dan He who laughs, lasts
niyaw
niyaw
#define DIRECTINPUT_VERSION 0x0700

before including dinput.h.
deadlydog
deadlydog
I did the #define DIRECTINPUT_VERSION 0x0700, thnx. But now when I try and run the program it does link, but then a black screen comes up and then disappears and that''s it. When I try and debug the program I just to the black screen, then it freezes on me. Any ideas anyone?

- Dan
He who laughs, lasts
deadlydog
deadlydog
I still haven''t figured out my problem above, so any help with that would be greatly appreciated. Also, here''s some code straight from the Ticks of the Windows Game Programming Gurus CD, from the T3dlib2.cpp:

// first find the fucking GUID of your particular joystick
lpdi->EnumDevices(DIDEVTYPE_JOYSTICK,
DInput_Enum_Joysticks,
&joystickGUID,
DIEDFL_ATTACHEDONLY);

This happened to be where one of my errors were that adding the #define DIRECTINPUT_VERSION 0x0700 was, and I happed to notice the swear word in the comments. I though that was kind of strange. I''m assuming it was just a joke thing that he forgot to take out in the final version of his book and code. Interesting though.

- Dan
He who laughs, lasts

Topic Locked

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

Sign in to reply to this topic.