因工作需要,要编译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

  1. curl -O http://mirrors.kernel.org/gnu/m4/m4-1.4.13.tar.gz
  2. tar -xzvf m4-1.4.13.tar.gz
  3. cd m4-1.4.13
  4. ./configure prefix=/usr/local
  5. make
  6. sudo make install
  7. cd ..
  8. curl -O http://mirrors.kernel.org/gnu/autoconf/autoconf-2.65.tar.gz
  9. tar -xzvf autoconf-2.65.tar.gz
  10. cd autoconf-2.65
  11. ./configure prefix=/usr/local
  12. make
  13. sudo make install
  14. cd ..
  15. curl -O http://mirrors.kernel.org/gnu/automake/automake-1.11.tar.gz
  16. tar xzvf automake-1.11.tar.gz
  17. cd automake-1.11
  18. ./configure prefix=/usr/local
  19. make
  20. sudo make install
  21. cd ..
  22. curl -O http://mirrors.kernel.org/gnu/libtool/libtool-2.2.6b.tar.gz
  23. tar xzvf libtool-2.2.6b.tar.gz
  24. cd libtool-2.2.6b
  25. ./configure prefix=/usr/local
  26. make
  27. sudo make install

安装完成后重新执行

  1. cd /Applications/ProtocolBuffers-2.2.0-Source
  2. ./autogen.sh
  3. ./configure
  4. 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. 关于apache的重启

    一:Apache重起的最好方法apachectl graceful http://blog.csdn.net/qianling3439/article/details/8622618 二:请问apac ...

  2. 编写一个简单的Jquery插件

    1.实现内容 定义一个简单的jquery插件,alert传递进来的参数 2.插件js文件(jquery.showplugin.js) (function ($) { //定义插件中的方法 var me ...

  3. C#面向对象(四)虚方法实现多态

    一.虚方法实现多态 1,创建一个people基类 using System; using System.Collections.Generic; using System.Linq; using Sy ...

  4. iOS 实现进度条(progress)

    #import <UIKit/UIKit.h> @interface ZSDProgressView : UIView { UIView *progressView;//进度view } ...

  5. Windows8不联网直接安装.Net 3.5 Framework的方法

    把你的系统ISO加载到虚拟光驱或插入系统安装盘,找到X:\sources\sxs路径(X是你的光驱盘符).输入下面命令,盘符以D盘为例DISM /Online /Enable-Feature /Fea ...

  6. javascript线程解释(setTimeout,setInterval你不知道的事)---转载

    在工作中,可能我们经常遇到在有很多 setInterval 的页面, 再手动触发 setTimeout 的时候经常失败, 尤其是 jquery做动画的时候,一些渐入溅出的东西,很多东西都不被触发……, ...

  7. Netty4 自定义Decoder,Encoder进行对象传递

    首先我们必须知道Tcp粘包和拆包的,TCP是个“流”协议,所谓流,就是没有界限的一串数据,TCP底层并不了解上层业务数据的具体含义,它会根据TCP缓冲区的实际数据进行包的划分,一个完整的包可能会被拆分 ...

  8. 基调(听云)app,服务器,质量测试手段

    1. 网络质量检测 http://www.tingyun.com/tingyun_network.html

  9. PL/SQL在win7X 64下安装

    oracle11g怎么安装在此不作说明,网上到处都是,主要针对PL/SQL的安装配置 下载地址: PLSQL Developer: http://pan.baidu.com/s/1nt7G4cD X6 ...

  10. 第三回 Bootstrap3.x 起步

    基本模版 <!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="u ...