解决undefined reference to symbol ‘pthread_condattr_setclock@@GLIBC_2.3.3‘

可以试试在cmakelist增加:

find_package(Boost REQUIRED COMPONENTS system chrono thread)

include_directories(
    ${Boost_INCLUDE_DIRS}
)

target_link_libraries(demo_exe
    ${Boost_LIBRARIES}
)

你可能感兴趣的:(c++,开发语言,linux)