title: How to extract boost::filesystem using bcp
body: <p>I'm trying to create a subset of the boost library including the filesystem module, so I can include that subset in my project repository. I got a linker error until I copied the .lib files over manually. I'm using Visual Studio 2013 on Windows 7 64-bit.</p>
  
  <p>I've successfully extracted boost/algorithm/string.hpp and its dependencies using bcp, by using the following steps:</p>
  
  <ol>
  <li><p>Downloaded (v 1.57.0) from boost.org.</p></li>
  <li><p>Extracted.</p></li>
  <li><p>Ran</p>
  
  <pre><code>bootstrap.bat
  </code></pre>
  
  <p><strike>then</p>
  
  <pre><code>b2.exe
  </code></pre>
  
  <p></strike></p>
  
  <p>as described at <a href="http://www.boost.org/doc/libs/1_57_0/more/getting_started/windows.html#prepare-to-use-a-boost-library-binary" rel="nofollow noreferrer">Getting Started on Windows</a>.</p>
  
  <p><strike>(I don't know if b2 was necessary for my purposes.)</strike></p></li>
  <li><p>Built the bcp tool by opening a command prompt where I had extracted the boost archive, and ran</p>
  
  <pre><code>bjam tools\bcp
  </code></pre>
  
  <p>as described <a href="https://stackoverflow.com/a/7047704">here</a>.</p></li>
  <li><p>Created the boost library subset by running</p>
  
  <pre><code>dist\bin\bcp.exe algorithm/string.hpp [outdir]
  </code></pre></li>
  <li><p>Copied the result into a subfolder under my project, added the boost directory to the C++ include search path, and built the project.</p></li>
  </ol>
  
  <p>...</p>
  
  <p>When I add filesystem or filesystem.hpp to the command above, (even if I use the --scan option on my own source file(s),) and copy the result to my project folder, then just try to include "boost/filesystem.hpp", I get</p>
  
  <pre><code>LINK : fatal error LNK1104: cannot open file 'libboost_system-vc120-mt-gd-1_57.lib'
  </code></pre>
  
  <p>There were no <code>*.lib</code> files to be found in the output from bcp. To get it to build, I had to manually copy the <code>libboost_system-*.lib</code> and <code>libboost_filesystem-*.lib</code> files from stage\lib\ to my project (and add the directory containing them to Project Properties -> Configuration Properties -> Linker -> General -> Additional Library Directories).</p>
  
  <p>Is this expected behavior that bcp didn't copy everything needed? Or did I miss a step? Or is it a bcp bug?</p>