mac 10.9.4编译protobuf

本文详细介绍了如何下载并安装protobuf-2.4.1.tar.gz,包括解决安装过程中可能遇到的问题,如缺少autoreconf,以及在macOS环境下可能遇到的tr1/tuple相关错误,并提供了相应的解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

下载protobuf-2.4.1.tar.gz:
http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.gz
安装:
tar zxvf protobuf-2.4.1.tar.gz
cd protobuf-2.4.1
./configure
sudo make
sudo make check
sudo make install

在安装过程中遇到不少问题 缺少 autoreconf  那就安装 autoreconf

brew install automake

Which should also install autoconf and allow rvm to finish installing.

如果没有brew 在安装brew linux 批量修改文件编码格式     这篇文章中又命令 安装 brew

error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
//安装libtool
sudo brew install libtool

On OS X, you may get an error:在mac中可能会穿线tr1/tuple 则修改 一下
./configure CPPFLAGS=-DGTEST_USE_OWN_TR1_TUPLE=1

在这个文件有个错误

找到文件src/google/protobuf/message.cc 在文件的第一个#include之上的一行,加入

#include <istream>



评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值