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")
add_compile_options(-pthread)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")