繁体   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