boost 系列 2:boost 编译

本文详细介绍了如何在Windows和Linux环境下编译和安装Boost库。对于Windows环境,使用Visual Studio 2008进行命令行操作;对于Linux环境,则通过g++编译并提供了具体的编译指令。同时,还提供了编译完成后库文件和头文件的存放位置。

PART 1:

D:\WORK\CURRENT\boost

The following directory should be added to to linker library paths: 

D:\WORK\CURRENT\boost\stage\lib
  

 

stage(即在"某平台:下编译,此为windows 32 位系统)

 



 

PART 2:

 

仅g++编译,特定平台参考 上面的网址。

Easy Build and Install

Issue the following commands in the shell (don't type $; that represents the shell's prompt):

$ cd path/to/boost_1_46_1
$ ./bootstrap.sh --prefix=path/to/installation/prefix (build目录,我的是build_boost目录,见下方红字部分)

to install somewhere else. Also, consider using the --show-libraries and --with-libraries=library-name-list options to limit the long wait you'll experience if you build everything. Finally,

$ ./bjam install

will leave Boost binaries in the lib/ subdirectory of your installation prefix. You will also find a copy of the Boost headers in the include/ subdirectory of the installation prefix, so you can henceforth use that directory as an #include path in place of the Boost root directory.

 

 

 

编译后的路径(build目录)
lib:(库文件)

 

dengwei@localhost boost_1_47]$ find ./* -name *.a

build_boost2/ build_boost/lib/libboost_chrono.a

 

build_boost2/ build_boost/lib/libboost_chrono.so

 

Include:(对应代码)
...

 

 

 

 

 

 

 

 

转载于:https://www.cnblogs.com/no7dw/archive/2011/09/05/2168066.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值