title: How to link boost libraries properly in Linux
body: <p>I've been trying to go through Boost tutorials but I got stuck at linking the filesystem library.</p>
  
  <p>I have Ubuntu 12.10. Installation wasn't that hard</p>
  
  <pre><code>sudo apt-get install libboost-all-dev
  </code></pre>
  
  <p>This put all headers in /usr/local/include and compiled sources in /usr/lib/ <br/>
  [--headers] <br/>
  [--binaries]</p>
  
  <p>I wrote this program [--program]. When I tried to compiled it <br/></p>
  
  <pre><code> g++ -g tut1.cpp -o tut1 -lboost_system -lboost_filesystem
  </code></pre>
  
  <p>got this errors: [--errors].
  <br/>After a little search on <a href="http://www.boost.org/doc/libs/1_53_0/more/getting_started/unix-variants.html" rel="noreferrer">http://www.boost.org/doc/libs/1_53_0/more/getting_started/unix-variants.html</a>
  <br/> I tried this:<br/></p>
  
  <pre><code>g++ -g -I /usr/local/include/boost/ tut1.cpp -o tut1 -L /usr/lib/libboost_filesystem.a -lboost_system -lboost_filesystem 
  </code></pre>
  
  <p>but didn't have luck. I had the same errors.</p>
  
  <p>Since I cannot put more than 2 links in the post, here are all links<br/>
  <a href="http://pastebin.com/DakVFn12" rel="noreferrer">http://pastebin.com/DakVFn12</a></p>