I picked up the following demo off the web from https://computing.llnl.gov/tutorials/pthreads/
#include #include #define NU
If you are using cmake, you can use:
add_compile_options(-pthread)
Or
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")