簡體   English   中英

使用64位編譯器進行編譯時出現奇怪的定義錯誤

[英]Strange define Error when compiling with 64bit compiler

我嘗試使用64位MinGW GCC編譯器來編譯enigma套件( http://www.bytereef.org/enigma-suite.html )。 當我使用32位編譯器時,一切正常。 使用64位操作系統時,出現以下錯誤:

enigma\global.h|6|error: expected identifier or '(' before numeric constant|

和有關的行是:

#define H 0

出於好奇,我將線路更改為

#define H3 0 

並且有效(當然,在更改所有外觀之后)。 誰能解釋這種行為?

MinGW 5.1具有標頭mingw32\\i686-w64-mingw32\\include\\winnt.h 它包含行6889的結構定義:

DWORD H : 1;

當然,如果包含更高的包含#define H 0標頭,則是一個問題。

MinGW 4.8沒有這種結構,因此可以在此處進行編譯。


簡單的解決方法是將#include <windows.h>移至hillclimb.c頂部

暫無
暫無

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

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