📅 2013-Jun-05 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ directx, error, visual studio ⬩ 📚 Archive
Problem
I compiled a C++ solution with Visual Studio Express 2012. The compilation was successful. But, when I try to run the program, it gives this error:
---------------------------
foo.exe - System Error
---------------------------
The program can't start because XINPUT1_4.dll is missing from your computer. Try reinstalling the program to fix this problem.
---------------------------
OK
---------------------------
Solution
I searched my computer for XINPUT1_4.dll and could not find it. There were other related DLL files: xinput1_1.dll, xinput1_2.dll and xinput1_3.dll, but not this file.
The solution is to find out if the solution is linking with xinput.lib. This might be either in the Project Properties or in the code itself using a pragma comment(lib, …) directive. Either way, change this to the specific version of the lib file found in your computer. On my system, I found the Xinput9_1_0.lib and changed my code to this.
After compiling the solution again, the program executed successfully.
Tried with: Visual Studio Express 2012 for Windows Desktop and Windows 7 x64