title: g++ ubuntu multithreading undefined reference
body: <p>I am writing a c code on ubuntu that creates a certain number of threads
  I have already added pthreads library but when I run the code 
  it ends up with this error</p>
  
  <p>Threads.cc:(.text+0x128): undefined reference to 'pthread_create'</p>
  
  <p>Threads.cc:(.text+0x15b): undefined reference to 'pthread_join'</p>
  
  <p>I am using ubuntu 15.04 virtual machine. 
  I have tried many suggested solutions, non of them worked!
  any help would be appreciated</p>