c ubuntu gcc undefined reference « pthread_create » code example
Example 1: undefined reference to `pthread_create' c++
add_compile_options(-pthread)
Example 2: undefined reference to `pthread_create' c++
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")