Poco::Uint32 和 Mactypes Uint32 是模棱两可的

Poco::Uint32 and Mactypes Uint32 are ambiguous

本文关键字:Uint32 模棱两可 Poco Mactypes      更新时间:2023-10-16

在ios usr/include/MacTypes.h中有一个

typedef unsigned long  UInt32;

在Poco/Types.h中也有

typedef unsigned int  UInt32; 

当我尝试编译时,它会给出错误:

Reference to "Uint32" is ambiguous

在这个链接中,这家伙的问题与我完全相同。但我不明白解决方案。那么有没有人知道解决方案?

*注意:我没有直接包括Poco/Types.h。这是从另一个头文件中包含的。MacTypes.h包含在另一个库头文件中。

我解决了这个问题,如果你遇到这个问题,你应该改变导入标题的顺序。您应该在本机标头之后导入 Poco 标头。