title: Having trouble compiling boost filesystem's tutorial file
body: <p>I'm attempting to compile <a href="http://www.boost.org/doc/libs/1_51_0/libs/filesystem/example/tut3.cpp" rel="nofollow">this</a> tutorial file from boost::filesystem.</p>
  
  <p>I'm using this command:</p>
  
  <pre><code>clang++ -std=c++11 -stdlib=libc++ tut3.cpp -L/usr/local/lib -lboost_filesystem-mt -lboost_system-mt
  </code></pre>
  
  <p>However, I'm getting:</p>
  
  <pre><code>Undefined symbols for architecture x86_64:
    "boost::filesystem::path_traits::dispatch(boost::filesystem::directory_entry const&amp;, std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;&amp;, std::__1::codecvt&lt;wchar_t, char, __mbstate_t&gt; const&amp;)", referenced from:
        boost::filesystem::path::path&lt;boost::filesystem::directory_entry&gt;(boost::filesystem::directory_entry const&amp;, boost::enable_if&lt;boost::filesystem::path_traits::is_pathable&lt;boost::decay&lt;boost::filesystem::directory_entry&gt;::type&gt;, void&gt;::type*) in tut3-FljaLL.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  
  <p>I'm using the clang included in Mountain Lion, and boost is installed with <code>brew install --with-mpi --use-clang</code>.  (mpich2 is also installed with <code>--use-clang</code>).</p>
  
  <p>The verbose linker output:</p>
  
  <pre><code>Apple clang version 4.0 (tags/Apple/clang-421.0.57) (based on LLVM 3.1svn)
  Target: x86_64-apple-darwin12.1.0
  Thread model: posix
   "/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name tut3.cpp -pic-level 1 -mdisable-fp-elim -relaxed-aliasing -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 133.3 -v -resource-dir /usr/bin/../lib/clang/4.0 -fmodule-cache-path /var/folders/nb/qkspw0z92f506gbjq9gb505r0000gn/T/clang-module-cache -stdlib=libc++ -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/spott/Documents/Code/ebss/bin -ferror-limit 19 -fmessage-length 272 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-dispatch-method=mixed -fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o /var/folders/nb/qkspw0z92f506gbjq9gb505r0000gn/T/tut3-9Q4qRh.o -x c++ tut3.cpp
  clang -cc1 version 4.0 based upon LLVM 3.1svn default target x86_64-apple-darwin12.1.0
  ignoring nonexistent directory "/usr/include/c++/v1"
  #include "..." search starts here:
  #include &lt;...&gt; search starts here:
   /usr/bin/../lib/c++/v1
   /usr/local/include
   /usr/bin/../lib/clang/4.0/include
   /usr/include
   /System/Library/Frameworks (framework directory)
   /Library/Frameworks (framework directory)
  End of search list.
   "/usr/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.8.0 -o a.out -L/usr/local/lib/ /var/folders/nb/qkspw0z92f506gbjq9gb505r0000gn/T/tut3-9Q4qRh.o -lboost_filesystem-mt -lboost_system-mt -lc++ -lSystem /usr/bin/../lib/clang/4.0/lib/darwin/libclang_rt.osx.a
  Undefined symbols for architecture x86_64:
    "boost::filesystem::path_traits::dispatch(boost::filesystem::directory_entry const&amp;, std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;&amp;, std::__1::codecvt&lt;wchar_t, char, __mbstate_t&gt; const&amp;)", referenced from:
    boost::filesystem::path::path&lt;boost::filesystem::directory_entry&gt;(boost::filesystem::directory_entry const&amp;, boost::enable_if&lt;boost::filesystem::path_traits::is_pathable&lt;boost::decay&lt;boost::filesystem::directory_entry&gt;::type&gt;, void&gt;::type*) in tut3-9Q4qRh.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  
  <p>I'm honestly not sure what the problem is, any ideas?</p>