簡體   English   中英

'winbase.h' 中的編譯錯誤

[英]Compile error in 'winbase.h'

編譯winbase.h時,Windows 文件出現以下錯誤。

不知道為什么我收到語法錯誤並且編譯器顯示更多:

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

這里有一個簡單的代碼來重現問題:

#include <winbase.h>

int main()
{
    return 0;
}

您是否直接包含<winbase.h>

你不應該 - 它期望在處理之前定義/聲明一些東西。 特別是在這種情況下,標識符ULONG_PTRintsafe.h聲明為 typedef。

包括<windows.h>

您可能缺少一個; 緊接在代碼中的#include <windows.h>行之前。 或者,在包含文件行之前有一些類似標識符的文本。

int ABC
#include <windows.h>

如果您的代碼很好,並且#include "winbase.h"之前沒有缺少分號,那么它應該是winbase.h (或包含它的文件之一)之前缺少的包含。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM