Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ 版本问题 #64

Open
lx-str opened this issue May 17, 2023 · 3 comments
Open

C++ 版本问题 #64

lx-str opened this issue May 17, 2023 · 3 comments

Comments

@lx-str
Copy link

lx-str commented May 17, 2023

/usr/local/include/absl/base/policy_checks.h:79:2: error: #error "C++ versions less than C++14 are not supported."
这个问题是因为什么呢?怎么解决呢?

@lx-str
Copy link
Author

lx-str commented May 18, 2023

安装最新版的protobuf出现这个问题,安装3.19.4版本的protobuf解决了

@LextU
Copy link

LextU commented May 19, 2023

感谢你的issue和解决方案!3.19.4版本的protobuf可顺利完成编译。

此外,我尝试了在最新版protobuf下将tinyrpc的CMakeList.txt第7行的-std=c++11改为-std=c++17(因为-std=c++14会报关于std的错误),但在cmake过程中报错:

/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
error: ld returned 1 exit status

@lx-str
Copy link
Author

lx-str commented May 19, 2023

感谢你的解答!

对于cmake报错的问题,我在3.21.9版本的protobuf下遇到过。不知你在安装protobuf过程中,protobuf测试是否全部通过?我当时有一个测试不能通过,解决了这个问题后问题得到了解决。(参考protocolbuffers/protobuf#7860 的方法,将内存和CPU数扩大后,测试全部通过。)

可是,出现了新的问题,所调用的函数属于更旧版本的protobuf,因此我最终还是选择了3.19.4版本。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants