Archived

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

Direct Input Dev-C++

This topic is 5180 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


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

Share this post


Link to post
Share on other sites