Menu

Boost.test and dependency on Boost.thread?

2016-12-21
2016-12-21
  • Andrzej Ciereszko

    Hi,

    I'm trying to build Boost.test on windows version 1.62.0. I'm building --with-test and my output file is libboost_unit_test_framework-vc140-mt-gd-1_62.lib / dll

    Everything goes fine, but when I add the unit_test.hpp header in my project, the linker compains that libboost_thread-vc140-mt-gd-1_62.lib cannot be located.

    I'm surprised, I was under the impression that when I build --with-test, using b2, all the dependencies of Boost.test will be built, I mean I see that it build chrono, timer and system, should it have also built thread?

    I double and triple checked to see if my project does not bring in the thread.hpp header - it does not. It is set up to auto-link the libs.

    I also ran BCP

    bcp --boost=b:\temp\boost_1_62_0 --list test

    on the boost/test folder, and it does seem to list thread files:
    boost\thread.hpp
    ....
    libs\thread\build\has_atomic_flag_l
    libs\thread\build\Jamfile.v2
    libs\thread\src\future.cpp
    libs\thread\src\pthread\once.cpp
    libs\thread\src\pthread\once_atomic
    libs\thread\src\pthread\thread.cpp
    libs\thread\src\tss_null.cpp
    libs\thread\src\win32\thread.cpp
    libs\thread\src\win32\tss_dll.cpp
    libs\thread\src\win32\tss_pe.cpp

    I have a feeling I do not fully understand what is going on. Is Boost.unit dependent on Boost.thread? If so, why isn't it build automatically by b2. If not where could this be dependency be coming from...

    Thanks,

    Andrzej

     
  • Smith jhone

    Smith jhone - 2024-03-10
    Post awaiting moderation.

Log in to post a comment.