Skip to main content
gamedev.net
🔒 Locked

error C2065

Started by Mardigin Jan 17, 2002 at 12:11 AM 6 replies 700+ views
Original Post
Mardigin
Mardigin
I have already included the following lib modules... ddraw.lib dxguid.lib dinput.lib and I added #include <dinput.h> Yet I am getting the following error... error C2065: ''DirectInputCreate'' : undeclared identifier error C2065: ''DIDEVTYPE_JOYSTICK'' : undeclared identifier Thank you in advance
BaShildy
BaShildy
If your using visual studio, make sure that you set the directories section to include the libs from the directx sdk. Also make sure that they are on top of the compiler/windows includes.

- Kevin "BaShildy" King
Game Programmer: DigiPen
www.mpogd.com
Kevin "BaShildy" KingGame Programmer: DigiPenwww.mpogd.com
OutAxDx
OutAxDx
That means you''re trying to use DirectInputCreate, a function that does not exist. Thats not an include or "link to libs" error. Find out the function''s real name.
zipless
zipless
hee hee, this one caught me out too initially.

You probably don''t want to be including "dinput.lib", instead try including "dinput8.lib" or one relative to your dx version.

zipless
/ Ignorance is bliss, then you go and spoil it by learning stuff /
Mark Duffill
Mark Duffill
And dont forget under DirectX 8 its DirectInput8Create()
CaptainJester
CaptainJester
I had the same problem. I was trying to compile DirectX7 code with DirectX8.1 libraries.

If you are using the DirectX 8 SDK, but you want to compile older code, you have to #define DIRECT_DRAW_VERSION 0700. To use DirectX 7 code. It looks like you are going even earlier to vers6 or less. For each component of DirectX you have to do this

#define DIRECT_DRAW_VERSION 0600 //use version 6
#define DIRECT_INPUT_VERSION 0600 //use version 6

etc...


---
Make it work.
Make it fast.

"Commmmpuuuuterrrr.." --Scotty Star Trek IV:The Voyage Home
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][
Mardigin
Mardigin
Alright I was able to get rid of the errors by
#define DIRECT_INPUT_VERSION 0800 //use version 8
But not when I
#define DIRECT_INPUT_VERSION 0700 //use version 7

Now when I define for version 8 the DirectInput8Create now takes another perameter that i am not familiar with. Does anyone know why I the define for version 7 would not be working for me?

Mardigin
Mardigin
Ahh I got it figured out. Took me long enough.
Thank you all for your help

Topic Locked

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

Sign in to reply to this topic.