title: Which linker options to include gcc
body: <p>I compile a project and run it on my system, it does perfectly fine.</p>
  
  <p>I uploaded this to git and asked my administrator to run it on server and it says <code>undefined reference to 'clock_gettime'</code>. This error can be resolved by linking a library with <code>-lrt</code> option. Similar problem happened to me earlier but that was related to linking <code>math.h</code> library with the help of <code>-lm</code> option.</p>
  
  <p>Is there a way to find which all libraries to link so that ou do not run into such problems and not feel embarrassed in front of your administrator. How to decide what all libraries to link. Can there be a thought process for this?</p>