title: undefined reference to symbol 'pthread_mutexattr_setpshared@@GLIBC_2.2.5'
body: <p>I tried to add -lpthread but it didn't work. here is my makefile:</p>
  <pre><code>mpi_bench: mpbench.o flushall.o timer.o my_send.o mem_manager.o
      $(MP_MPI_CC) $(MP_LDFLAGS)  mpbench.o flushall.o timer.o my_send.o mem_manager.o -o $@ $(MPI_LIBS) $(MP_LIBS)
  
  mpbench.o: mpbench.c
      $(MP_MPI_CC) $(MP_CFLAGS) $(MPI_INC) -DMPI -I.. -c  mpbench.c  -o mpbench.o 
  
  timer.o: ../timer.c
      $(MP_MPI_CC) -c -I.. ../timer.c -o $@ 
  
  flushall.o: ../flushall.c
      $(MP_MPI_CC) -c -I.. ../flushall.c -o $@  
  
  my_send.o: my_send.cpp
      $(MP_MPI_CC)  -c -I.. my_send.cpp -o my_send.o -lrt 
  mem_manager.o: mem_manager.cpp
      $(MP_MPI_CC)  -c -I.. mem_manager.cpp -o mem_manager.o -lrt -lpthread
  </code></pre>
  <p>here is the error information</p>
  <pre><code>mpicc   mpbench.o flushall.o timer.o my_send.o mem_manager.o -o mpi_bench  -lrt
  /usr/bin/ld: mem_manager.o: undefined reference to symbol 'pthread_mutexattr_setpshared@@GLIBC_2.2.5'
  /usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
  collect2: error: ld returned 1 exit status
  </code></pre>
  <p>can anyone a help me out? thank you so much</p>