title: Including the Boost filesystem header
body: <p>I have a big project.</p>
  <p>In <code>N.cpp</code> I need to use <code>boost::filesystem::exists(path)</code> to check if the path is valid.</p>
  <p>For that, I include <code>&lt;boost/filesystem.hpp&gt;</code></p>
  <p>I get the following error:</p>
  <pre><code>Error    2    error LNK2005: &quot;public: enum boost::filesystem::file_type __cdecl boost::filesystem::file_status::type(void)const &quot; (?type@file_status@filesystem@boost@@QEBA?AW4file_type@23@XZ) already defined in N.obj    D:\MProject\DA\boost_filesystem-vc100-mt-gd-1_53.lib(boost_filesystem-vc100-mt-gd-1_53.dll)    DA
  
  Error    1    error LNK2005: &quot;public: __cdecl boost::filesystem::path::~path(void)&quot; (??1path@filesystem@boost@@QEAA@XZ) already defined in N.obj    D:\MProject\DAboost_filesystem-vc100-mt-gd-1_53.lib(boost_filesystem-vc100-mt-gd-1_53.dll)    DA
  
  Error    3    error LNK1104: cannot open file 'libboost_filesystem-vc100-mt-gd-1_53.lib'    D:\MProject\DA\LINK    DA
  </code></pre>
  <p>If I do not include the header file, I get:</p>
  <pre><code>Error    2    error C3861: 'exists': identifier not found    D:\MProject\DA\ThirdParty\N.cpp    108    1    DA
  Error    1    error C2653: 'boost' : is not a class or namespace name    D:\MProject\DA\ThirdParty\N.cpp    108    1    DA
  </code></pre>
  <p><strong>What is the right way to use <code>boost::filesystem::exists</code> so that the whole thing would compile?</strong></p>
  <h3>N.cpp</h3>
  <pre><code>#include &lt;boost/filesystem.hpp&gt;
  .....
  CHECK( boost::filesystem::exists(*i), std::string(&quot;file &quot;).append(*i).append(&quot; does not exist&quot;).c_str() );
  
  .....
  </code></pre>