add -lpthread flag to link the ptherad librar
y