boost1_55_0编译和安装

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

2、进行解压目录

    2.1 编译前的配置工作

    执行bootstrap.bat  windows

    使用vs2010:

              修改\boost_1_55_0\tools\build\v2\user-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)\CodeBlocks\MinGW\bin

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

           3、 修改\boost_1_55_0\tools\build\v2\user-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_0\stage\lib下面。

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

    

转载于:https://www.cnblogs.com/zxpo/p/3535554.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值