gpt4 book ai didi

c++ - protobuf 库在消息实例化时抛出 FatalException

转载 作者:行者123 更新时间:2023-11-30 04:55:50 24 4
gpt4 key购买 nike

我正在从源代码编译 protobuf 3.6.1,并链接到一个针对 Ubuntu 16.04 的可执行文件。一旦创建了任何消息类型的对象,该库就会抛出异常并显示以下控制台输出:

[libprotobuf FATAL /myproj/protobuf/src/google/protobuf/generated_message_util.cc:785] CHECK failed: (scc->visit_status.load(std::memory_order_relaxed)) == (SCCInfoBase::kRunning):
terminate called after throwing an instance of 'google::protobuf::FatalException'
what(): CHECK failed: (scc->visit_status.load(std::memory_order_relaxed)) == (SCCInfoBase::kRunning):
Aborted

最佳答案

如解释here ,您需要运行 pkg-config 或以其他方式确定在使用 protobuf 的项目中使用哪些构建标志。在这种特殊情况下,pthread 库丢失了。

关于c++ - protobuf 库在消息实例化时抛出 FatalException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52890529/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com