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.
I've successfully extracted boost/algorithm/string.hpp and its dependencies using bcp, by using the following steps:
Downloaded (v 1.57.0) from boost.org.
Extracted.
Ran
bootstrap.bat
thenb2.exe
as described at Getting Started on Windows.
(I don't know if b2 was necessary for my purposes.)Built the bcp tool by opening a command prompt where I had extracted the boost archive, and ran
bjam tools\bcp
as described here.
Created the boost library subset by running
dist\bin\bcp.exe algorithm/string.hpp [outdir]
Copied the result into a subfolder under my project, added the boost directory to the C++ include search path, and built the project.
...
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
LINK : fatal error LNK1104: cannot open file 'libboost_system-vc120-mt-gd-1_57.lib'
There were no *.lib
files to be found in the output from bcp. To get it to build, I had to manually copy the libboost_system-*.lib
and libboost_filesystem-*.lib
files from stage\lib\ to my project (and add the directory containing them to Project Properties -> Configuration Properties -> Linker -> General -> Additional Library Directories).
Is this expected behavior that bcp didn't copy everything needed? Or did I miss a step? Or is it a bcp bug?