将学习变成乐趣,一直在路上
每天1990

导航

 
通过网上下载的protobuf2.4.1的压缩文件,然后进行安装,./configure和make时遇到了两个问题。
正常的安装步骤如下:
./configure
make 
make check
make install
protoc —version
 
问题一
protobuf2.4.1通过下载的tar.gz文件安装时./configure报错:./include/gtest/internal/gtest-port.h:428:10: fatal error: 'tr1/tuple' file not found
 
解决方法
进入解压后的protobuf2.4.1目录,输入命令【./autogen.sh】生成configure文件
 
然后输入以下命令进行安装
./configure
make 
make check
make install
 
问题二
安装到make步骤时报错:google/protobuf/message.cc:175:16: error: implicit instantiation of undefined template
 
解决方法
编辑目录下的文件./src/google/protobuf/message.cc,添加头文件#include <istream>,问题解决,继续下面的安装步骤即可
 
 
备注
从git上下载protobuf2.4.1非常慢,然后再微盘上找到了一个下载资源http://vdisk.weibo.com/s/tYlk6JrNUYTY
 
posted on 2016-08-20 19:13  每天1990  阅读(5382)  评论(0编辑  收藏  举报