• boost1_55_0编译和安装


    1、在www.boost.org下载文件并解压

    2、进行解压目录

        2.1 编译前的配置工作

        执行bootstrap.bat  windows

        使用vs2010:

                  修改oost_1_55_0 oolsuildv2user-config.jam文件,

                 # Configure specific msvc version (searched for in standard locations and PATH).
                 # using msvc : 8.0 ;
                  using msvc : 10.0 ; //新增加的

        使用CodeBlocks自带的MinGW编译器:

               1、先把编译所在路径加入到环境变量中,如我本机为D:Program Files (x86)CodeBlocksMinGWin

               2、新打开cmd窗口,输入gcc -v查看gcc的版本。成功显示说明加入环境变量成功,可以进行编译。

               3、 修改oost_1_55_0 oolsuildv2user-config.jam文件,

                    # Configure gcc (default version).
                    using gcc ;    //去掉前面的#表示启用

        执行./bootstrap.sh  linux

         2.2 编译

         b2.exe --buildtype=complete stage windows

         ./b2 --buildtype=complete stage linux

         2.3  可以选择库进行编译

         b2 --show-libraries,可查看所有必须编译才能使用的库

         b2 --with-date_time --with-thread --buildtype=complete stage 只编译date_time 和thread库

    3、引用相头的库即可使用。按步骤2.3进行编译的话生成库存放位置在boost_1_55_0stagelib下面。

    install                 Install headers and compiled library files to the  configured locations (below).
    #
    #   --prefix=<PREFIX>       Install architecture independent files here.
    #                           Default; C:Boost on Win32
    #                           Default; /usr/local on Unix. Linux, etc.

    stage                   Build and install only compiled library files  to the stage directory.
    #
    #   --stagedir=<STAGEDIR>   Install library files here
    #                           Default; ./stage

        

  • 相关阅读:
    Linux cat和EOF的使用
    Linux sleep命令 和 wait命令
    Linux watch 命令
    Linux下cut命令用法
    Linux tr 命令使用
    python sqlite3使用
    SQLite数据库安装与使用
    mysql出现错误“ Every derived table must have its own alias”
    cocos2D(二)---- cocos2D文档的使用
    sqlite3 脚本的使用
  • 原文地址:https://www.cnblogs.com/zxpo/p/3535554.html
Copyright © 2020-2023  润新知