编译错误在'winbase.h' [英] Compile error in 'winbase.h'

查看:834
本文介绍了编译错误在'winbase.h'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在编译 winbase.h 时,我得到一个Windows文件的以下错误。

I get the following error with a Windows file when compiling winbase.h.

不知道为什么我得到语法错误,编译器显示更多:

Not sure why I get a syntax error and the compiler shows many more:

1> c:\program files\microsoft sdks\windows\v6.0a\include\winbase.h(238) : 
   error C2146: syntax error : missing ';' before identifier 'Internal'

这里是一个重现问题的简单代码:

Here a simple code to reproduce the problem:

#include <winbase.h>

int main()
{
    return 0;
}


推荐答案

$ c>< winbase.h> 直接?

Are you including <winbase.h> directly?

你不应该 - 它期望在处理之前定义/声明一些东西。具体来说,在这种情况下,标识符 ULONG_PTR 被声明为 intsafe.h 中的typedef。

You shouldn't - it expects to have some things defined/declared before it's processed. Specifically in this case the identifier ULONG_PTR which is declared as a typedef in intsafe.h.

包括< windows.h>

这篇关于编译错误在'winbase.h'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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