zoukankan      html  css  js  c++  java
  • protobuf-3.0.0-beta-2 windows编译 x64/x86

    V3.0.0 beta2以及之后都是CMake 创建VS Solution,project。 因为只能创建x64的项目工程,有时候需要x86的, 只能创建完x64后,自己修改工程配置弄成x86。

    创建步骤参考 protobuf-3.0.0-beta-2/cmake/readme.md

     C:Path	oprotobufcmakeuild>mkdir release & cd release
     C:Path	oprotobufcmakeuild
    elease>cmake -G "NMake Makefiles" ^
     -DCMAKE_BUILD_TYPE=Release ^
     -DCMAKE_INSTALL_PREFIX=../../../../install ^
     ../..
    
    C:Path	oprotobufcmakeuild>mkdir debug & cd debug
     C:Path	oprotobufcmakeuilddebug>cmake -G "NMake Makefiles" ^
     -DCMAKE_BUILD_TYPE=Debug ^
     -DCMAKE_INSTALL_PREFIX=../../../../install ^
     ../..
    
     C:Path	oprotobufcmakeuild>mkdir solution & cd solution
     C:Path	oprotobufcmakeuildsolution>cmake -G "Visual Studio 14 2015 Win64" ^
     -DCMAKE_INSTALL_PREFIX=../../../../install ^
     ../..
    
    

    cmake -G "Visual Studio 14 2015 Win64" ^
    这里cmake只能创建x64的工程属性,要不然是ARM的。 参考 https://cmake.org/cmake/help/v3.3/generator/Visual Studio 14 2015.html

    只能生成x64的之后,在VS工程属性中 【Link】
    修改
    【TargetMachine】
    【addition options】

    release 默认, debug 有debug

    x86 ,x64

    都有不同,看下拉设置。

    To compile protobuf:

    C:Path oprotobufcmakeuild elease>nmake
    or

    C:Path oprotobufcmakeuilddebug>nmake

    Testing

    To run unit-tests:

    C:Path oprotobufcmakeuild elease>nmake check
    or

    C:Path oprotobufcmakeuilddebug>nmake check

    Installing

    To install protobuf to the specified install folder:

    C:Path oprotobufcmakeuild elease>nmake install
    or

    C:Path oprotobufcmakeuilddebug>nmake install

  • 相关阅读:
    XML DOM介绍和例子
    关于IFRAME 自适应高度的研究
    UrlReWriter 使用经验小结
    ASP无限分类数据库版
    全国天气预报代码
    可输入的下拉框
    web2.0_RSS_.net读写
    ASP与存储过程[转帖]
    NetBox Asp Web服务器
    css里可以加表达式 :expression
  • 原文地址:https://www.cnblogs.com/scotth/p/5267435.html
Copyright © 2011-2022 走看看