When writing and compiling code that use threads or that run in a threaded job, make sure to do the following:
#define _MULTI_THREADED
#include <pthread.h>
The preprocessor definition _MULTI_THREADED must come before the pthread.h.
See Header files for Pthread functions for more information on header files.
See Using the _MULTI_THREADED preprocessor definition for more information on the _MULTI_THREADED preprocessor definition.
Pthread APIs | APIs by category |