EDIT: It seems BCP does what I want: Building a subset of boost in windows
I'm attempting to distribute a Visual Studio 2010 project containing my C++ source. I've configured my VS solution to include the boost libraries relative to my solution directory (Using $(SolutionDir)).
Obviously Boost contains many headers that I don't need and they obviously increase the archive size that I want to distribute.
Here are the headers I include in my code. Is there any way to determine which .hpp files in the $BOOST_ROOT/boost directory I need?
#include <boost/lexical_cast.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/thread/condition_variable.hpp>
#include <boost/thread/mutex.hpp>
I have compiled Boost, to access the filesystem libraries, and the $BOOST_ROOT/stage/lib directory contains many files that were compiled when I built Boost. Do I need all these .lib files? Are they safe to delete? Or do they depend on each other?
Ideally, I would only keep the header files that I include, and the .lib files needed by icl, but I'm not sure how to make that happen.
EDIT: This is for a school assignment. The code will be run and graded on the same machine that was used to write the assignment. They won't compile Boost/install Boost, so I'm including the relevant libs.
Any help is appreciated and I will try to update this question as best as I can if you comment for questions.
Thank you!
Just use bcp to copy the parts of Boost that you actually use.
However, if you're trying to distribute a project along with your source, you generally want the user to be able to compile Boost for themselves. So you probably shouldn't be distributing Boost with your application.
If you were using header-only libraries, that wouldn't be a problem. But since you're using compiled parts of Boost, the user should have the ability to compile those for themselves. Just in case they have an install of Boost lying around, like a lot of people do.