简体   繁体   English

在Eclipse CDT中将SendInput与MinGW结合使用

[英]Using SendInput with MinGW in Eclipse CDT

I'm trying to use SendInput() on Windows but I'm building under MinGW using Eclipse CDT... the header files included with mingw don't expose this function, so I'm wondering if/how you can access such a feature? 我正在尝试在Windows上使用SendInput() ,但是我正在使用Eclipse CDT在MinGW下构建... mingw附带的头文件没有公开此功能,所以我想知道是否/如何访问这样的文件。特征? Or.... is it a trap that can't be avoided thanks to microsoft making all their SDK's only work with visual studio? 或者....这是一个无法避免的陷阱,这要归功于微软使所有SDK都只能与Visual Studio一起使用吗? Thanks! 谢谢!

Found out the issue with a little more research. 通过更多研究发现了问题。 Normally I would delete my posts when I find the solution shortly after but since I couldn't find the solution or anything related to this problem here, I'll post an answer: 通常,我会在找到解决方案后不久删除我的帖子,但是由于我在这里找不到解决方案或与此问题相关的任何内容,因此我将发布答案:

"You need #define _WIN32_WINNT 0x500 // or any other value higher than 403 before including windows.h" “在包含windows.h之前,您需要#define _WIN32_WINNT 0x500 // or any other value higher than 403

From: http://www.cplusplus.com/forum/windows/48595/ 来自: http : //www.cplusplus.com/forum/windows/48595/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM