簡體   English   中英

錯誤:不同類型的typedef重新定義(“ unsigned short”與“ __darwin_size_t”(又名“ unsigned long”))

[英]ERROR: typedef redefinition with different types ('unsigned short' vs '__darwin_size_t' (aka 'unsigned long'))

我正在嘗試為我的程序創建一個make文件,但不斷出現此錯誤

error: typedef redefinition with different types
      ('unsigned short' vs '__darwin_size_t' (aka 'unsigned long'))
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/sys/_types/_rsize_t.h:30:32: note: 
      previous definition is here
typedef __darwin_size_t        rsize_t;
                               ^

我的頭文件中有一個unsigned short,名為typedef unsigned short rsize_t; 但是我沒有任何名為typedef __darwin_size_t rsize_t;東西typedef __darwin_size_t rsize_t; 在我的任何文件中,有人可以向我解釋這里發生了什么嗎?

typedef __darwin_size_t rsize_t; 是操作系統的頭文件之一的一部分。 沒有試圖定義rsize_t兩次-您只定義了一次,操作系統也是如此。

將您的rsize_t重命名為其他名稱。

暫無
暫無

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

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