错误编译“未声明CONDITION_VARIABLE"; [英] Error compile "CONDITION_VARIABLE undeclared"

查看:69
本文介绍了错误编译“未声明CONDITION_VARIABLE";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对不起,如果我的英语不好的话.

sorry for my bad english if it's bad.

我的代码

#include <windows.h>

int     main(void)
{
    CONDITION_VARIABLE      cond;

    return 0;
}

编译时出现以下错误.

CONDITION_VARIABLE undeclared

我的错误与 stackoverflow问题,并且我在Winbase.h文件中看到我没有以下typedef

i have the same error than in this stackoverflow question, and i have seen in my Winbase.h file than i don't have the following typedef

typedef RTL_CONDITION_VARIABLE CONDITION_VARIABLE, *PCONDITION_VARIABLE;

我找到了在哪里可以找到更好的Winbase.h的地方,我已经找到了这个网站

i have found where i can to find a better Winbase.h, i have found this site

http://source.winehq.org/source/include/winbase.h

但是我想知道是否可以用该站点内容的简单副本替换当前的Winbase.h文件?还是有更好的方法?

But i want to know if i can replace my current Winbase.h file with a simple copy past of content of this site ? or there is a better method please ?

再见.

推荐答案

在Windows Vista中添加了对 CONDITION_VARIABLE 的支持.如果标头中未声明 CONDITION_VARIABLE ,则您正在使用Windows SDK的较旧版本.不要修改SDK标头.您将需要获取SDK的最新版本(例如, Windows8 SDK ).

Support for CONDITION_VARIABLE was added in Windows Vista. You are using an older version of the Windows SDK if CONDITION_VARIABLE is not declared in the headers. Do not modify the SDK headers. You will need to obtain a recent version of the SDK (e.g. the Windows 8 SDK).

这篇关于错误编译“未声明CONDITION_VARIABLE";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆