Server.c:(.text+0x270): undefined reference to `pthread_create' Server.c:(.text+0x2aa): undefined reference to `pthread_join' 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")