Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Linking error with xinput

$
0
0
Hi Im trying to get xinput to work for controller support. Im copying Xinput9_1_0.lib to a folder which Im including in a c++ library path in visual studio 2013. I still get: Error 3 error LNK2019: unresolved external symbol _XInputGetState@8 referenced in function "public: void __thiscall keyHandler::controllerConnected(void)" (?controllerConnected@keyHandler@@QAE_NXZ) C:\Dropbox\PROJECT\code\games\post\source\Main.obj zombies Thats a linker error right? Did i do something wrong? This is what im tryiong to run: void controllerConnected(){ int controllerId = -1; for (DWORD i = 0; i < XUSER_MAX_COUNT && controllerId == -1; i++) { XINPUT_STATE state; ZeroMemory(&state, sizeof(XINPUT_STATE)); if (XInputGetState(i, &state) == ERROR_SUCCESS) controllerId = i; } }

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>