因工作需要,要编译Object-C可用的Protocbuf,开始查资料,

http://www.cnblogs.com/uniy/archive/2011/12/21/2296405.html

结果执行完

A. 下载Protocol Buffers将下载解压后的文件存放至Applications目录下,进到ProtocolBuffers-2.2.0-Source目录看看会发现 有个src目录。用命令切换至ProtocolBuffers-2.2.0-Source目录下。

下载地址: http://code.google.com/p/metasyntactic/downloads/list

  B.  ./autogen.sh

  C.  ./configure (如果说没有权限,chmod +x configure)

  D.  make

之后发现src下没有protoc这个可执行文件,看下log

./autogen.sh: line 28 : autoreconf: command not found

是因为autoconf没安装,继续查资料

找到安装autoconf的方法

http://igaojie.com/webdev/562.html

curl -O http://mirrors.kernel.org/gnu/m4/m4-1.4.13.tar.gz
tar -xzvf m4-1.4.13.tar.gz
cd m4-1.4.13
./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

安装完成后重新执行

cd /Applications/ProtocolBuffers-2.2.0-Source
./autogen.sh
./configure
make

发现make之后出现error:

google/protobuf/message.cc:130:60:error:implicit instantiation of undefined

继续查资料,

http://blog.csdn.net/fangzhangsc2006/article/details/17364057

在ProtocolBuffers-2.2.0-Source/src/google/protobuf/message.cc中头部加上#include <istream>

重新编译protobuf,

protoc终于出来了。

Object-C编译的Protobuf的更多相关文章

  1. QT中使用MinGW 编译的protobuf库--包含库的生成和使用

    QT中使用MinGW 编译的protobuf库--包含库的生成和使用 0前言 1准备工作 2生成protobuf库文件 3在QT中测试protobuf的使用 4结语 0前言 最近要在QT中使用prot ...

  2. VS2013编译google protobuf 出现问题error C3861: “min”:

    问题描述: 今天用vs2013编译protobuf 2.4.1 报错: 错误 3 error C3861: "max": 找不到标识符 f:\google\protobuf\pro ...

  3. centos 编译 安装 protobuf

    link:http://dbua.iteye.com/blog/1633079 yum -y install gcc+ gcc-c++ yum -y install make 下载protobuf-2 ...

  4. ubuntu编译安装protobuf

    测试环境:Ubuntu 16.04 LTS 到protobuf的release页面 下载源码:https://github.com/protocolbuffers/protobuf/releases/ ...

  5. Windows下编译Google.Protobuf在Qt(C++)中使用与Unity3d(C#)交互

    1.首先从Github-Protobuf下载代码,本文下载的版本号是3.1.0. 2.仔细查看各个README,有相关的资源下载和编译说明. 3.在一个方便的地方创建一个Install类型的文件夹,放 ...

  6. mac 安装protobuf,并编译

    因公司接口协议是PB文件,需要将 PB 编译成JAVA文件,且MAC 电脑,故整理并分享MAC安装 google 下的protobuf 文件   MAC 安装protobuf 流程 1.下载 http ...

  7. Ubuntu编译protobuf

    个人博客地址:http://www.bearoom.xyz/2019/08/24/ubunt-protobuf/ 因为编译了tensorflow C++的版本,然后提示protobuf的版本不对应引起 ...

  8. Tensorflow object detection API ——环境搭建与测试

    1.开发环境搭建 ①.安装Anaconda 建议选择 Anaconda3-5.0.1 版本,已经集成大多数库,并将其作为默认python版本(3.6.3),配置好环境变量(Anaconda安装则已经配 ...

  9. 玩转动态编译 - 高级篇:一,IL访问静态属性和字段

    IL介绍 通用中间语言(Common Intermediate Language,简称CIL,发音为"sill"或"kill")是一种属于通用语言架构和.NET ...

随机推荐

  1. centos复制到另外一台电脑连不上网

    http://snow-berry.iteye.com/blog/1991754 从一台电脑virtual box克隆出来的centos.vdi复制到另外一台电脑,找不到网卡,提示Device eth ...

  2. centos下 rpm包sphinx安装成功提示

    sphinx: /etc/sphinx /usr/share/sphinx Sphinx installed! Now create a full-text index, start the sear ...

  3. 【转】使用断言NSAssert()调试程序错误

    NSAssert()只是一个宏,用于开发阶段调试程序中的Bug,通过为NSAssert()传递条件表达式来断定是否属于Bug,满足条件返回真值,程序继续运行,如果返回假值,则抛出异常,并切可以自定义异 ...

  4. JavaScript 中的算术运算

    JavaScript中算术运算在溢出(overflow).下溢(underflow)或被零整除时不会报错,当数字运算结果超过了JavaScript所能表示的数字上限(溢出),结果为一个特殊的无穷大(i ...

  5. Hadoop2.0重启脚本

    Hadoop2.0重启脚本 方便重启带ha的集群,写了这个脚本 #/bin/bash sh /opt/zookeeper-3.4.5-cdh4.4.0/bin/zkServer.sh restart ...

  6. Kinect For Windows V2开发日志六:人体的轮廓的表示

    Kinect中带了一种数据源,叫做BodyIndex,简单来说就是它利用深度摄像头识别出最多6个人体,并且用数据将属于人体的部分标记,将人体和背景区别开来.利用这一特性,就可以在环境中显示出人体的轮廓 ...

  7. hdu 3234 并查集

    虚拟一个根节点n,设其值为0.并且始终保持其为根. #include<map> #include<set> #include<cmath> #include< ...

  8. hdu 4738 桥

    题目:还是自己看题目吧 trick:当不连通时不需要人去炸.否则,当桥的费用为0时当然需要一个人去炸... #include <set> #include <map> #inc ...

  9. 开启Microsoft SQL Management时,如果出现"未能加载包

    Ms Sql server 2005在开启Microsoft SQL Management时,如果出现"未能加载包“Microsoft SQL Management Studio Packa ...

  10. 修改的某人的SqlHelper FOR ODBC

    随便找来的,源作者不明. 本来是SQL SERVER 的 修改为 ODBC使用. 并且修改了连接字符串,可以允许修改一次. using System; using System.Collections ...