这两天用了一下Protobuf 感觉很方便, 记录一下编译过程, 以做务忘(需要安装cmake):

1: 下载地址: https://developers.google.com/protocol-buffers/docs/downloads

2: 解压后会有一个cmake目录, 打开vs command line 并进入cmake目录

3: c:\protobuf\cmake > mkdir build & cd build

4: 如果编译为debug:

  c:\protobuf\cmake\build>mkdir debug & cd debug

  c:\protobuf\cmake\build\debug>cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=../../../install ../..

5: 如果编译为debug:

  c:\protobuf\cmake\build>mkdir release & cd release

  c:\protobuf\cmake\build\release>cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=../../../install ../..

6: 开始编译

  c:\protobuf\cmake\build\debug>nmake

7: 安装

  c:\protobuf\cmake\build\debug>nmake install

  成功后会在最上层根目录(c:\protobuf)下生成一个install的文件夹,里面有三个文件夹,bin,include和lib。

原文地址: Google protobuf windows 下编译

google::protobuf 编译方法的更多相关文章

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

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

  2. window下编译并使用google protobuf

    参考网址: http://my.oschina.net/chenleijava/blog/261263 http://www.ibm.com/developerworks/cn/linux/l-cn- ...

  3. caffe编译环境的错误:..build_release/src/caffe/proto/caffe.pb.h:23:35: fatal error: google/protobuf/arena.h: 没有那个文件

    在搭建caffe的环境时出现错误: .build_release/src/caffe/proto/caffe.pb.h:23:35: fatal error: google/protobuf/aren ...

  4. caffe安装编译问题-ImportError: No module named google.protobuf.internal

    问题描述 ~/Downloads/caffe$ python Python (default, Dec , ::) [GCC ] on linux2 Type "help", &q ...

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

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

  6. 报错google.protobuf.text_format.ParseError: 166:8 : Message type "object_detection.protos.RandomHorizontalFlip" has no field named "i".解决方法

    运行python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_mobilenet_ ...

  7. GOOGLE PROTOBUF开发者指南

    原文地址:http://www.cppblog.com/liquidx/archive/2009/06/23/88366.html 译者: gashero 目录 1   概览 1.1   什么是pro ...

  8. google protobuf使用

    下载的是github上的:https://github.com/google/protobuf If you get the source from github, you need to gener ...

  9. google protobuf 使用示例

    定义.proto接口文件 package tutorial; message Person { required ; required int32 id = ; //unique ID number ...

随机推荐

  1. 新闻cms管理系统(三) ------菜单管理

    1.前期准备工作 (1)模板介绍 添加菜单的模板页面 菜单管理首页: 添加菜单页面: (2)公共类引入介绍 公共函数文件的引入(位置: Application/Admin/Controller/Com ...

  2. LWIP network interface 网卡 初始化 以 STM32 为例子 后面会有 用 2G 或者4G 模块 用 PPP拨号的 形式 虚拟出网卡 所以先以 这个为 前提

    LWIP   network interface   网卡 初始化    以  STM32  为例子  后面会有 用  2G 或者4G 模块 用 PPP拨号的 形式  虚拟出网卡  所以先以 这个为 ...

  3. ts简单点

    typescript 简洁使用 *做最简洁核心的记录,可以节约时间.再是提炼概括,理解归纳.便于日后查阅联想* > typescript原则之一: 对值所具有的结构进行类型检查 #### 基础类 ...

  4. Android签名生成和互转

    原文链接:http://blog.votzone.com/2018/05/05/android_signature.html   Android 的签名有两种方式,一种使用jdk 提供的jarsign ...

  5. 实际SQL案例解决方法整理_LEAD函数相关

    表结构及数据如下: 需求: 将记录按照时间顺序排列,每三条记录为一组,若第二条记录与第一条记录相差5分钟,则删除该记录,若第三条与第二条记录相差5分钟,则删除该记录, 第二组同理,遍历全表,按要求删除 ...

  6. 使用属性Props完成一张卡片

    一:我们先安装bootstrap,为了使我们的样式好看些 cnpm  install bootstrap  --save 二:我们在index.js中引入bootstap Import ‘bootst ...

  7. Java并发编程(八)线程间协作(上)

    多线程并发执行时,不同的线程执行的内容之间可能存在一些依赖关系,比如线程一执行a()方法和c()方法,线程二执行b()方法,方法a()必须在方法b()之前执行,而方法c()必须在方法b()之后执行.这 ...

  8. C++练习 | 二分练习

    Codeforces 371C : Hamburgers #include<bits/stdc++.h> using namespace std; char B='B',S='S',C=' ...

  9. Codeforces Round #483 (Div. 2) B题

    B. Minesweeper time limit per test 1 second memory limit per test 256 megabytes input standard input ...

  10. 误卸载glibc类库导致系统崩溃解决方案

    由于系统中没有yum环境需要编译安装redis,但系统中却没有安装gcc和gcc-c++,挂载本地镜像安装gcc和gcc-c++由于版本太高,由于一时疏忽误将系统的依赖库glibc使用rpm -e 命 ...