Jump to content
  • Advertisement
Sign in to follow this  
suliman

xinput1_4.dll missing?

Recommended Posts

Hi

Im developing on win 10 and have included xinput1_4.dll for controller support. It works fine.

But some people who try my game get the error "xinput1_4.dll missing" even though they have directx installed. It can be related to running win 7 I now suspect (instead of win 10). Should these people have another file? When just adding the file "xinput1_4.dll" that I send (which works for me) it doesnt help them. And how would I compile my game so it works with both win 10 and other versions (such as win 7 and xp)?

Thanks!

Edited by suliman

Share this post


Link to post
Share on other sites
Advertisement

So I should use 1.3? Then it  would work for both win xp, win 7 and win 10? I mean I need my game to work for windows in general, not just one version :)

I should maybe just use XInput 9.1.0. Seems to be compatable with most windows and I dont think i need the missing features.

BUT:
When I switch to xinput9_1_0.lib instead (which should make it compatible with win 7) i get problems. I set it in visual studio c++ (in linker->input->additional dependencies), and then I get:

Error	3	error LNK2019: unresolved external symbol _XInputGetState@8 referenced in function "public: bool __thiscall gameController::CheckConnection(class std::vector<bool,class std::allocator<bool> > &)" (?CheckConnection@gameController@@QAE_NAAV?$vector@_NV?$allocator@_N@std@@@std@@@Z)	C:\Dropbox\PROJECT\code\games\post\source\gameController.obj	zombies

Error	4	error LNK1120: 1 unresolved externals	C:\Dropbox\PROJECT\code\games\post\bin\game.exe	1	1	zombies

Is it because I dont have the runtime for old xinput installed? This is unnecessarily messy to set up...

Edited by suliman

Share this post


Link to post
Share on other sites

What it sort of boils down to is that if you want to support Windows 7, then depending on what bits of the DirectX SDK you're using you might need to install the Legacy Standalone (June 2010) DirectX SDK to have access to those older versions.  I believe XInput 1.3 is one of those things (and the older XAudio version may be as well, IIRC).  You shouldn't need to supply redistributables for XInput (although there is a legacy DirectX redist), but you need to build against the earliest version that supports the Windows version you need.

https://blogs.msdn.microsoft.com/chuckw/2012/04/25/xinput-and-windows-8/

https://blogs.msdn.microsoft.com/chuckw/2010/09/08/not-so-direct-setup/

This also may mean you need to do include path shenanigans in your projects to make sure you're including the legacy SDK headers and not a more recent Windows SDK version.

Once you move past needing Windows 7 support (which no one really can afford to do yet), I think there is no more need for the Legacy standalone DirectX SDK and things are much simpler.

Edited by SBD

Share this post


Link to post
Share on other sites

I solved it.

I switched to linking with xinput9_1_0.lib as I said above. This got me the error i posted which I didnt understand. I found that I had an old lib file which had some version-compability problem. Removing that file, it seems to use the lib file installed into the windows installation, which now works! (my game runs well in win 7 now as well as win 8 and 10).

So in summary:

>> link with xinput9_1_0.lib for supporting win 7 (uses the older xinput 9.1.0)

>> link with xinput.lib to use xinput 1.4. Those game will not run on win 7 but have some extra bells and whistles (which i dont need, for example voice chat support)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • 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!