gpt4 book ai didi

c++ - xbox 360 Controller 功能的链接器错误

转载 作者:行者123 更新时间:2023-11-30 05:24:33 24 4
gpt4 key购买 nike

我得到了一个未定义的 XInputGetState 引用,我不知道为什么。我使用的 header 是:XInput.hWindows.h

FIRSTPLAYER 只是常量 0

XINPUT_STATE state;
ZeroMemory( &state, sizeof(XINPUT_STATE) );
// Simply get the state of the controller from XInput.
dwResult = XInputGetState( FIRSTPLAYER, &state );

任何建议都会很好。

我使用 CodeBlocks IDE 和 MinGW 作为编译器。

最佳答案

好吧,我想通了。缺少这一行:

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

有更好的解决方法吗?我觉得这很奇怪!

关于c++ - xbox 360 Controller 功能的链接器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38630510/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com