Boost not Linking properly using CMake on Ubuntu

情到浓时终转凉″ 提交于 2019-11-29 12:55:09

It looks like you installed a static version of boost.

The boost::log::v2_mt_posix namespace is implemented in dynamically built versions of boost (see this link). Your application will attempt to link against symbols from this namespace if you define the BOOST_LOG_DYN_LINK macro during compilation.

If you have the statically built version of Boost.Log installed to /usr/local, try removing the -DBOOST_LOG_DYN_LINK from your ${CMAKE_CXX_FLAGS} line, regenerate your build directory and attempt the build again. (Side note: typically you will add compiler definitions with the add_definitions() command, see this link)

Or, reinstall a dynamic version of boost.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!