Error linking Boost with CMake

后端 未结 2 1708
無奈伤痛
無奈伤痛 2020-12-22 03:43

I am using CLion on OS X 10.10.5 (Yosemite) and trying to use the logging boost (1.58.0) library.

I installed boost using brew install boost. I checked

相关标签:
2条回答
  • 2020-12-22 03:57

    You have to set #define BOOST_LOG_DYN_LINK 1, this can be done with cmake using add_definitions(-DBOOST_LOG_DYN_LINK=1).

    0 讨论(0)
  • 2020-12-22 04:08

    Reading the output makes my suspicion clearer, it doesn't link with any Boost libraries, because you haven't added any Boost libraries to your find_package command.

    You need to explicitly list the libraries you want to find and use in the find_package command.

    0 讨论(0)
提交回复
热议问题