冲突的intmax_t定义 - Boost 1.53和gcc 4.8不兼容?

时间:2014-01-19 14:21:07

标签: c++ gcc boost

我最近升级到Ubuntu Trusty Tehr,现在我正在开发的C ++项目将无法构建。

看起来stdlib和Boost由于某种原因不能很好地协同工作。一堆typedef在两者之间是冲突的,下面是其中一个错误,其中intmax_t在两个地方定义。我不确定是什么改变了,但我现在有gcc(Ubuntu / Linaro 4.8.2-14ubuntu2)4.8.2并且提升版本:1.53.0.0ubuntu2

以下是一个示例错误消息:

/usr/include/inttypes.h:290:8: error: reference to ‘intmax_t’ is ambiguous
extern intmax_t imaxabs (intmax_t __n) __THROW __attribute__ ((__const__));
    ^
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h:9:0,
             from /usr/include/inttypes.h:27,
             from src/uint256.h:11,
             from src/key.h:12,
             from src/crypter.h:8,
             from src/keystore.h:8,
             from src/script.h:14,
             from src/script.cpp:11:
/usr/include/stdint.h:134:19: note: candidates are: typedef long int intmax_t
typedef long int  intmax_t;
               ^
In file included from /usr/include/boost/math_fwd.hpp:12:0,
             from /usr/include/boost/math/common_factor_ct.hpp:13,
             from /usr/include/boost/variant/variant.hpp:44,
             from /usr/include/boost/variant.hpp:17,
             from src/script.h:12,
             from src/script.cpp:11:
/usr/include/boost/cstdint.hpp:306:50: note:                 typedef boost::long_long_type boost::intmax_t
  typedef  ::boost::long_long_type            intmax_t;

非常感谢任何帮助。我很好地降级了一些东西,我只是不确定要降级什么。

0 个答案:

没有答案