Boost.Log linking errors under GNU/Linux

前端 未结 2 1578
刺人心
刺人心 2021-02-04 10:59

I would like to test the Boost.Log library. Unfortunately, I get link errors.

I use Arch Linux, and I installed Boost headers and libraries via built-in package manager

2条回答
  •  忘了有多久
    2021-02-04 11:21

    If you are using cmake then:

    find_package(Boost REQUIRED COMPONENTS system log)
    target_link_libraries(credential ${Boost_SYSTEM_LIBRARY} ${Boost_LOG_LIBRARY})
    

    and use:

    #define BOOST_LOG_DYN_LINK 1
    

提交回复
热议问题