简体   繁体   English

链接器不想识别lib文件

[英]the linker doesnt want to recognize the lib file

I want to create a queue timer . 我想创建一个队列计时器 I call CreateTimerQueueTimer but it doesn't compile because it says 我叫CreateTimerQueueTimer但是它不能编译,因为它说

undefined reference to CreateTimerQueueTimer 对CreateTimerQueueTimer的未定义引用

and I showed the linker the path to the Kernel32.lib. 我向链接器显示了Kernel32.lib的路径。

I use CodeBlocks, right click on project name -> Build Option -> Linker Setting tab -> then clicked Add and went to the lib path, but it didn't help. 我使用CodeBlocks,右键单击项目名称->生成选项->链接器设置选项卡->然后单击添加并转到lib路径,但这没有帮助。 What causes this problem? 是什么导致此问题?

CreateTimerQueueTimer is a more recent API in Win32. CreateTimerQueueTimer是Win32中更新的API。 To enable it you need to define _WIN32_WINNT as 0x0500 or later. 要启用它,您需要将_WIN32_WINNT定义为0x0500或更高版本。 Add to your preproccessor defines _WIN32_WINNT=0x0500. 添加到您的前处理器定义_WIN32_WINNT = 0x0500。

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

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