在VS2013中构建boost库

时间:2013-08-31 22:13:11

标签: c++ visual-studio boost makefile bjam

我一直在撞墙砖一个多小时试图弄清楚如何让bjam为我需要的组件构建库。出于某种原因,它只想构建线程库而不是其他任何东西。如何建立特定的库?我在VS2013中使用makefile项目来构建所有内容。 bjam命令行最终看起来像这样:

bjam.exe -a -d0 address-model=64 --stagedir="$(IntDir)." --build-type=minimal --build-dir="$(IntDir).." --layout=system variant=debug --with-thread link=static threading=multi runtime-link=shared

输出如下:

Building the Boost C++ Libraries.



Component configuration:

    - atomic                   : not building
    - chrono                   : not building
    - context                  : not building
    - coroutine                : not building
    - date_time                : not building
    - exception                : not building
    - filesystem               : not building
    - graph                    : not building
    - graph_parallel           : not building
    - iostreams                : not building
    - locale                   : not building
    - log                      : not building
    - math                     : not building
    - mpi                      : not building
    - program_options          : not building
    - python                   : not building
    - random                   : not building
    - regex                    : not building
    - serialization            : not building
    - signals                  : not building
    - system                   : not building
    - test                     : not building
    - thread                   : building
    - timer                    : not building
    - wave                     : not building



The Boost C++ Libraries were successfully built!

The following directory should be added to compiler include paths:

    C:\Users\JCG\MyStuff\Checkouts\ScoreTracker\ThirdParty\Boost

The following directory should be added to linker library paths:

    C:\Users\JCG\MyStuff\Checkouts\ScoreTracker\ThirdParty\Boost\x64\Debug\lib

x64\Debug\lib\libboost_atomic.lib
x64\Debug\lib\libboost_chrono.lib
x64\Debug\lib\libboost_system.lib
x64\Debug\lib\libboost_thread.lib

让它构建只是线程的东西很好,但现在我还需要构建文件系统库,因为我刚开始使用它,但我不能为我的生活得到它来构建其他任何东西。

1 个答案:

答案 0 :(得分:2)

标志“--with-thread”告诉boost bjam只编译线程库。删除它以构建所有内容,或添加所需的其他标志。