boost 系列 2:boost 编译

PART 1:

  •   windows VS2008 参考http://hi.baidu.com/chinacharis/blog/item/1725d1dc9cc3c03d5982ddfc.html
  • 注意1 使用 Visual Studio 2008命令提示 进行操作。
  • 注意2 编译后的lib 正如其显示

    The Boost C== Libraries were successfully built!

  • The following directory should be added to to complier include paths:

  • 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:(对应代码)
...

 

 

 

 

 

 

 

 

posted @ 2011-09-05 22:20  邓维  阅读(532)  评论(0编辑  收藏  举报