问题描述
我已将 protoc 版本从 3.0.0 升级到 3.15.2 。现在我无法编译使用 protoc 输出文件(*.pb.cpp、*.pb.h)的程序。我收到如下所示的错误:
In function `google::protobuf::io::EpscopyOutputStream::EnsureSpace(unsigned char*)':
/usr/local/include/google/protobuf/io/coded_stream.h:694: undefined reference to `google::protobuf::io::EpscopyOutputStream::EnsureSpaceFallback(unsigned char*)'
In function `google::protobuf::internal::TaggedPtr<std::string>::Set(std::string*)':
/usr/local/include/google/protobuf/arenastring.h:101: undefined reference to `google::protobuf::internal::fixed_address_empty_string'
In function `google::protobuf::Arena::AllocatealignedWithHook(unsigned long,unsigned long,std::type_info const*)':
/usr/local/include/google/protobuf/arena.h:700: undefined reference to `google::protobuf::Arena::AllocatealignedWithHook(unsigned long,std::type_info const*)'
In function `google::protobuf::internal::ReadTag(char const*,unsigned int*,unsigned int)':
/usr/local/include/google/protobuf/parse_context.h:544: undefined reference to `google::protobuf::internal::ReadTagFallback(char const*,unsigned int)'
In function `google::protobuf::Arena::SpaceAllocated() const':
/usr/local/include/google/protobuf/arena.h:349: undefined reference to `google::protobuf::internal::ThreadSafeArena::SpaceAllocated() const'
In function `google::protobuf::UnkNownFieldSet::Clear()':
/usr/local/include/google/protobuf/unkNown_field_set.h:312: undefined reference to `google::protobuf::UnkNownFieldSet::ClearFallback()'
我在 google::protobuf 路径中遇到了这个 未定义的引用 错误。上面显示了很多相同的错误行。 我是否必须为升级版本包含任何其他附加库? 要么 我是否必须更改任何库的路径?如此处undefined reference to google protobuf
对此的任何帮助表示赞赏。
谢谢
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)