google protobuf src安装运行

在尝试安装google protobuf时遇到了autogen.sh执行失败的问题,通过在CentOS 6上执行`yum install libtool`解决了该问题。然而,之后在执行`make`时遇到了编译错误,错误涉及`InternalMetadataWithArena`和`InternalMetadataWithArenaLite`类的构造。通过修改源码中的注释,成功解决了编译错误并完成安装。
摘要由CSDN通过智能技术生成

学习运用google protobuf 使用

下载源码https://github.com/google/protobuf

如果是直接git的源码  按照src README.md 要求执行  ./autogen.sh 报错:autoreconf: /usr/bin/autoconf failed with exit status: 1

http://askubuntu.com/questions/449757/autogen-sh-script-failing-with-autoreconf2-50-automake-failed-with-exit-status 找到解决方法

我的系统是centos 6  执行 yum install libtool 后 再执行 ./autogen.sh 成功

执行make 在执行make 指令出现 在文件从./google/protobuf/any.pb.h:25包括,
从谷歌/的protobuf / any.pb.cc:5:
./google/protobuf/metadata.h:在构造'谷歌:: protobuf的::内部:: InternalMetadataWithArena :: InternalMetadataWithArena(谷歌:: protobuf的竞技场:: *)':

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值