iOS中ProtocolBuffer2.2的安装及google/protobuf/message.cc:130:60错误解决办法
来源:互联网 发布:nginx 实用技巧 编辑:程序博客网 时间:2024/05/13 14:14
安装ProtocolBuffer2.2过程:
需要安装autoconf 和automake 安装过程如下:
在终端中输入:
curl -O http://mirrors.kernel.org/gnu/m4/m4-latest.tar.gz
tar -xzvf m4-latest.tar.gz
cd m4-latestcd
./configure -prefix=/usr/local
make
sudo make install
cd ..
curl -O http://mirrors.kernel.org/gnu/autoconf/autoconf-2.65.tar.gz
tar -xzvf autoconf-2.65.tar.gz
cd autoconf-2.65
./configure -prefix=/usr/local
make
sudo make install
cd ..
curl -O http://mirrors.kernel.org/gnu/automake/automake-1.11.tar.gz
tar xzvf automake-1.11.tar.gz
cd automake-1.11
./configure -prefix=/usr/local
make
sudo make install
cd ..
curl -O http://mirrors.kernel.org/gnu/libtool/libtool-2.2.6b.tar.gz
tar xzvf libtool-2.2.6b.tar.gz
cd libtool-2.2.6b
./configure -prefix=/usr/local
make
sudo make install
--------------------------------------------------将ProtocolBuffers-2.2.0-Source-3.tar解压
终端进入 进入该目录
执行
./configure --prefix=/usr/local
make
sudo make install
protoc --version
git clone https://github.com/qzix/protobuf-objc
默认会在当前运行目录下创建protobuf-objc目录。
进入该目录,并执行:
./autogen.sh
./configure -prefix=/usr/local
make
sudo make install
----------------------------------------------遇到的问题:
---------------------------------------------2、make的时候出现错误:
google/protobuf/message.cc:130:60: error: implicit instantiation of undefined template 'std::__1::basic_istream<char, std::__1::char_traits<char> >'
return ParseFromZeroCopyStream(&zero_copy_input) && input->eof();
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:108:28: note: template is declared here
class _LIBCPP_TYPE_VIS basic_istream;
^
google/protobuf/message.cc:135:67: error: implicit instantiation of undefined template 'std::__1::basic_istream<char, std::__1::char_traits<char> >'
return ParsePartialFromZeroCopyStream(&zero_copy_input) && input->eof();
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:108:28: note: template is declared here
class _LIBCPP_TYPE_VIS basic_istream;
^
google/protobuf/message.cc:175:16: error: implicit instantiation of undefined template 'std::__1::basic_ostream<char, std::__1::char_traits<char> >'
return output->good();
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:110:28: note: template is declared here
class _LIBCPP_TYPE_VIS basic_ostream;
^
解决办法:找到文件src/google/protobuf/message.cc 在文件的第一个#include之上的一行,加入
#include <istream>
继续运行make ,即成功通过。
----------------------------------------
2016.3.31更新
git clone https://github.com/qzix/protobuf-objc
以前的github地址失效了
- iOS中ProtocolBuffer2.2的安装及google/protobuf/message.cc:130:60错误解决办法
- Google protobuf的安装及使用
- Google protobuf的安装及使用
- Google的Protobuf安装及使用笔记
- CAFFE中 安装google protobuf
- iOS中protobuf 的安装和使用
- linux下Google的Protobuf安装及使用笔记
- Google protobuf的安装及使用和理解
- [protobuf] 如何在Windows环境下的VS中安装使用Google Protobuf完成SOCKET通信
- google.protobuf.message.DecodeError: Truncated message. 解决方法
- libprotobuf ERROR google/protobuf/wire_format.cc:1059
- libprotobuf ERROR google/protobuf/wire_format.cc:1059
- linux下安装protobuf及常见错误
- protobuf安装中遇到的问题及解决方案
- iOS中CocoaPods的安装及错误详解
- 安装Google protobuf
- 安装vatic出现的错误及解决办法
- android中常见的错误及解决办法
- 编译libfdk-aac 库,使用根目录下的android.mk直接包含所有子目录下的android.mk文件
- 如何编译UE4的NXGI引擎
- 利用WebBrowser控件实现百度自动搜索
- 详细了解SQLITE 优缺点 性能测试
- 数据条数过大时,分片采集
- iOS中ProtocolBuffer2.2的安装及google/protobuf/message.cc:130:60错误解决办法
- [Codecademy] HTML&CSS 第四课:Social Networking Profile
- 圆角进度条_RoundCornerProgressBar
- Linux 目录结构
- 把文件数组排序
- I-jetty 移植及Https 配置使用
- LintCode:删除列表中的元素
- CRF
- Android下载多个图片(传统Http请求方式)