title: The difference between '-lfoo' and '/path/to/libfoo.so' when linking
body: <p>It seems that you can pass the <code>/path/to/libfoo.so</code> as input file to <code>gcc</code> and program will be linked correctly with it, just as when using <code>-lfoo</code> option in combination with <code>-L/path/to</code>.</p>
  
  <p>In case I know the full path of needed version of library, what is the difference?</p>