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;
}
}
↧