error in thread programming

Can you please let me know how to resolve this error:

cc pc1.c
/tmp/cc2os7n1.o: In function `main':pc1.c:(.text+0x89): undefined reference to `pthread_create'
collect2: ld returned 1 exit status

Have an include ...

#include <pthread.h>

and compile like this ...

cc pc1.c -lpthread

thanx man .. it works

and also define _REENTRANT eg

cc -D_REENTRANT ...

or make sure you use CFLAGS and put -D_REENTRANT in CFLAGS

this is so that things like errno are defined thread specific