【问题标题】:Poco::Uint32 and Mactypes Uint32 are ambiguousPoco::Uint32 和 Mactypes Uint32 不明确
【发布时间】:2016-01-24 15:53:08
【问题描述】:

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

typedef unsigned long  UInt32;

在 Poco/Types.h 中也有

typedef unsigned int  UInt32; 

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

Reference to "Uint32" is ambiguous

In this link 这家伙的问题和我一模一样。但我不明白解决方案。那么有人知道解决方案吗?

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

【问题讨论】:

    标签: c++ ios objective-c xcode poco


    【解决方案1】:

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

    【讨论】:

    • 无论如何你都应该这样做。
    猜你喜欢
    • 2011-12-18
    • 1970-01-01
    • 2012-11-03
    • 2012-09-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-01-19
    • 2018-06-26
    相关资源
    最近更新 更多