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

Direct Input Dev-C++

Started by CD579 Oct 13, 2003 at 4:37 AM 2 replies 1k views
Original Post
CD579
CD579
Hey, I seem to have a problem setting up Direct Input with Dev-C++. I have done everything according to the SDK, and yet I am getting linker errors. Everything seems to work fine until I get to here:
hr = lpMouse->SetDataFormat(&c_dfDIMouse);
  
It keeps giving me this error:
undefined reference to `c_dfDIMouse'
  
I am including the correct headers(d3dx8.h, Dinput.h) and have linked the correct libs(libdinput.a, libdinput8.a). Has anyone else had this problem, or know how to fix it? Thanks! CD Jesus is Lord!! [edited by - CD579 on October 13, 2003 5:38:17 AM]
Jesus is Lord!!
Ilankt
Ilankt
link DXGUID.LIB

ling=link :D

[edited by - ilankt on October 13, 2003 9:45:19 AM]
How appropriate, you fight like a cow!
Pipo DeClown
Pipo DeClown
quote:
Original post by Ilankt
ling DXGUID.LIB


That would be ''libdxguid.a'' for the Dev-C++ compiler.
And ''#define INIT_GUID'' might help, IIRC.

--
You''re Welcome,
Rick Wong
- sitting in his chair doing the most time-consuming thing..
Aldacron
Aldacron
Actually I DXGUID has nothing to do with this one. c_dfDIMouse is actually an instance of DIDATAFORMAT that is defined in dinput.lib. If you have ever tried to load DInput dynamically (via COM or LoadLibrary) you would have seen this error. SDL gets around this by populating its own versions of DIDATAFORMAT and using it instead. That''s the only option if you aren''t linking to the dinput lib.

Topic Locked

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

Sign in to reply to this topic.