Search code examples
c++boostboost-log

Reason for libboost_log_setup.a library?


In the latest Boost 1.54 release I see Boost.Log library appeared. When I compile whole Boost 1.54 I see that for the Log library it produced 2 binaries:

  • libboost_log.a
  • libboost_log_setup.a

What is the reason for the libboost_log_setup.a library? When should I link it?


Solution

  • libboost_log_setup contains extended support for logging.

    For example, when using a formatter into your logging activities, you'll require this library.

    By the way, note that you need to link libboost_log_setup BEFORE libboost_log, since the first depends on the last. In other words, you need to place libboost_log_setup before libboost_log in the libraries setup.