Jump to content
  • Advertisement


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


Direct Input Dev-C++

This topic is 5397 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
Original post by Ilankt

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..

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!