c++ - Linker error with a xbox 360 controller function -


i'm getting undefined reference xinputgetstate , have no idea why. headers i'm using : xinput.h , windows.h.

firstplayer constant 0.

xinput_state state; zeromemory( &state, sizeof(xinput_state) ); // state of controller xinput. dwresult = xinputgetstate( firstplayer, &state ); 

any advice nice.

i'm using codeblocks ide mingw compiler.

okay figured out. missing line :

#pragma comment(lib, "xinput.lib")  

is there better work around this? feel strange!


Comments