sogou / srpc

RPC framework based on C++ Workflow. Supports SRPC, Baidu bRPC, Tencent tRPC, thrift protocols.
Apache License 2.0
1.93k stars 382 forks source link

openeuler下编译时会报错C++标准,建议更新C++标准从11到14 #399

Closed wxd237 closed 1 month ago

wxd237 commented 1 month ago

static_assert(PROTOBUF_CPLUSPLUS_MIN(201402L), "Protobuf only supports C++14 and newer.");

holmes1412 commented 1 month ago

你好,感谢你的建议!这个是因为你用的protobuf的版本太新了~ 我们有用户用新版gtest的时候也遇到类似的问题,当时我们是判断gtest版本指定编译test目录的C++标准。

我想你的问题也许有两个比较可行的办法(我们也衡量下哪种更好):

  1. 对protobuf的版本进行判断,新版的使用C++14;
  2. srpc的thirt_party中把protobuf也包进去,这样免得用户额外安装;
Barenboim commented 1 month ago

直接用C++14编译吧。

Barenboim commented 1 month ago

https://github.com/sogou/srpc/pull/400 @wxd237 master分支直接改为C++14编译了。