title: Version numbers in shared object files
body: <p>I'm building a shared object file from a group of C++ source files using GCC.  All the example tutorials on building <code>.so</code> files show the file created with a version number after the <code>.so</code> suffix.  For example:</p>
  
  <pre><code>gcc -shared -Wl,-soname,libmean.so.1 -o libmean.so.1.0.1  calc_mean.o
  </code></pre>
  
  <p>This would produce the <code>.so</code> file libmean.so.1.0.1</p>
  
  <p>Additionally, if I browse the <code>/usr/lib</code> directory on my local machine, I see that many of the <code>.so</code> files have version numbers at the end.</p>
  
  <p>However, when I compile a shared object file and place it in <code>/usr/lib</code>, the linker is unable to find it if I put a version number at the end.  If I remove the version number, it works fine.  I really don't care about putting a version number or not, I just don't understand why this seems to be a common convention, and yet this causes the shared library to not work with the linker.  So, what's going on here?  Why is there a convention to place the version number at the end of an <code>.so</code> file name?</p>