Archived

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

CD579

Direct Input Dev-C++

Recommended Posts

CD579    116
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
Aldacron    4544
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