关于编译SDK-CPP部分时的错误
Created by: joelyang97
一些环境信息 系统:Ubuntu 16.04.5 LTS gcc/g++: 5.4.0 cmake: 3.5.1 python: 2.7.12
出现的情况 CMake过程中没有错误,顺利完成Configure。之后在make的过程中,前面是正常的,但是在编译SDK-CPP部分的时候会报出一些编译错误。下面截取其中主要的一些报错信息(基本都是语法错误): 1 /usr/include/c++/5/backward/hash_fun.h:136:12: error: previous definition of ‘struct __gnu_cxx::hash’ struct hash 2 serving/build/third_party/install/brpc/include/butil/strings/string_piece.h:416:70: error: ‘bool butil::operator!=(const StringPiece16&, const StringPiece16&)’ must have an argument of class or enumerated type inline bool operator!=(const StringPiece16& x, const StringPiece16& y) { 3 serving/build/third_party/install/brpc/include/butil/strings/string_piece.h:378:53: error: ‘string16’ was not declared in this scope extern template class BUTIL_EXPORT BasicStringPiece; 4 serving/build/third_party/install/brpc/include/butil/strings/string16.h:180:25: error: ‘basic_string’ is not a class template class BUTIL_EXPORT std::basic_string<butil::char16, butil::string16_char_traits>;
个人的想法 个人是觉得是由于自己的环境导致的,但是在CMake自动配置的时候没有报错。所以,想请您给一些建议,或者将您编译成功的环境告知一下(gcc版本,系统版本等)。