Yes, there are some using namespace boost statements, and some of them are
before some includes... but why would that suddenly break when it was
working before I upgraded? Is boost now defining its own intmax_t (and
other such tings, like uint64_t) where it wasn't before?
On Sun, Jan 19, 2014 at 11:03 AM, John Maddock
I recently upgraded to Ubuntu Trusty Tehr, and now the C++ project I'm
working on won't build.
It looks like the stdlib and Boost aren't working nicely together for some reason. A bunch of typedefs are conflicting between the two, below is one of the errors, where intmax_t is getting defined in two places. I'm not sure what changed, but I now have gcc (Ubuntu/Linaro 4.8.2-14ubuntu2) 4.8.2 and boost Version: 1.53.0.0ubuntu2
Here's an example error message:
/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;
Any help would be much appreciated. I'm fine with downgrading something, I'm just not sure what to downgrade.... or if there's an actual fix, that's cool too.
The two types are in different namespaces so I'm not sure why the Boost one would be found at all by GCC's headers... maybe you have a "using namespace boost" at global scope and before your #includes are complete?
John. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users