程序运行时的错误提示信息:
[libprotobuf FATAL google/protobuf/generated_message_util.cc:783] 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 (core dumped)
程序都编译通过,一跑就报错,调试了半天,没有看出什么问题
对了半天协议,以为协议没有对齐,最后确认也没有什么问题.
后来发现居然是因为编译的时候没有链接pthread库,编译时-lpthread就不会有这个问题.
从他的报错根本看不出来问题是在哪里,哭了。。。。