Undefined reference to symbol ‘pthread_create@@GLIBC_2.2.5‘ appears during CMake compilation

Solution:
Add after target_link_libraries() in the CMakeLists.txt file, in the following form: a>-lpthread

target_link_libraries(${PROJECT_NAME}
${PCL_LIBRARIES}
${EIGEN3_LIBS}
${OpenCV_LIBS}
-lpthread
)

Guess you like

Origin blog.csdn.net/guanjing_dream/article/details/133920141