Object-C编译的Protobuf
因工作需要,要编译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的更多相关文章
- QT中使用MinGW 编译的protobuf库--包含库的生成和使用
QT中使用MinGW 编译的protobuf库--包含库的生成和使用 0前言 1准备工作 2生成protobuf库文件 3在QT中测试protobuf的使用 4结语 0前言 最近要在QT中使用prot ...
- VS2013编译google protobuf 出现问题error C3861: “min”:
问题描述: 今天用vs2013编译protobuf 2.4.1 报错: 错误 3 error C3861: "max": 找不到标识符 f:\google\protobuf\pro ...
- centos 编译 安装 protobuf
link:http://dbua.iteye.com/blog/1633079 yum -y install gcc+ gcc-c++ yum -y install make 下载protobuf-2 ...
- ubuntu编译安装protobuf
测试环境:Ubuntu 16.04 LTS 到protobuf的release页面 下载源码:https://github.com/protocolbuffers/protobuf/releases/ ...
- Windows下编译Google.Protobuf在Qt(C++)中使用与Unity3d(C#)交互
1.首先从Github-Protobuf下载代码,本文下载的版本号是3.1.0. 2.仔细查看各个README,有相关的资源下载和编译说明. 3.在一个方便的地方创建一个Install类型的文件夹,放 ...
- mac 安装protobuf,并编译
因公司接口协议是PB文件,需要将 PB 编译成JAVA文件,且MAC 电脑,故整理并分享MAC安装 google 下的protobuf 文件 MAC 安装protobuf 流程 1.下载 http ...
- Ubuntu编译protobuf
个人博客地址:http://www.bearoom.xyz/2019/08/24/ubunt-protobuf/ 因为编译了tensorflow C++的版本,然后提示protobuf的版本不对应引起 ...
- Tensorflow object detection API ——环境搭建与测试
1.开发环境搭建 ①.安装Anaconda 建议选择 Anaconda3-5.0.1 版本,已经集成大多数库,并将其作为默认python版本(3.6.3),配置好环境变量(Anaconda安装则已经配 ...
- 玩转动态编译 - 高级篇:一,IL访问静态属性和字段
IL介绍 通用中间语言(Common Intermediate Language,简称CIL,发音为"sill"或"kill")是一种属于通用语言架构和.NET ...
随机推荐
- Java元组Tuple使用实例--转载
原文地址:http://50vip.com/35.html 一.为什么使用元组tuple? 元组和列表list一样,都可能用于数据存储,包含多个数据:但是和列表不同的是:列表只能存储相同的数据类型,而 ...
- SquashFs工具制作
下面是SquashFs.tar.gz的下载地址,解压后,直接执行其中的Makefile即可. SquashFs.tar.gz 说明: 制作squashfs格式的压缩镜像: ./mksquashfs . ...
- Linux数据归档和解压缩tar,cpio,gzip,bzip,lzma,zip命令使用
转载:http://www.1987.name/659.html 数据压缩归档和备份是系统管理的日常工作,定期备份不可小视,归档和压缩对于系统管理员或是普通用户来说都经常用到的操作,有很多中压缩格式, ...
- Mybatis-Generator 自动生成Dao、Model、Mapping相关文档
最近在学习mybatis,结果在写Mapping的映射文件时insert语句一直报错,于是想看看标准的映射文件是什么样.百度到Mybatis-Generator 自动生成Dao.Model.Mappi ...
- C++ Traits技术
要想深入的理解STL的迭代器.分配器等,就必须了解C++模板编程中的一个技巧——Traits. 1.问题的提出 C++的模板特性为泛型编程提供了支持.这样我们就可以编写更加通用的代码,而不必过分去关心 ...
- python UTC,时间戳,字符串转换
#!/usr/bin/env python #_*_coding:utf-8_*_ # 本地时间 转换 为时间戳 import time import pytz import datetime dat ...
- IOS 设置定时器
IOS 设置定时器 自动滚动视图 定时发送坐标信息 即时显示 时钟 NSTimer *timer; - (void)start {//1second 调用一次 timer = [NSTimer sc ...
- iOS 手机 邮箱 正则表达式
//iOS代码//判断邮箱格式是否正确的代码: //利用正则表达式验证 -(BOOL)isValidateEmail:(NSString *)email { NSString *emailRegex ...
- 神马小说:使用opensearch打造高性能搜索服务
神马小说--- 使用opensearch打造高性能搜索服务 [使用背景] 神马小说是最早使用opensearch的用户,和opensearch一起成长.目前神马小说每天2亿搜索pv,1000w 用户. ...
- NIS客户端限制用户登录
公司所有账号信息由一台 NIS Server 统一管理,但是有几台 NIS Client 只允许某几个用户登录.这里通过PAM机制来实现该需求. 1. 需要配置的文件 (/etc/pam.d/目录下) ...