I’m building a program that uses the following Boost headers (I’m using Microsoft Visual C++ 10),
#include <boost/filesystem.hpp>
#include <boost/date_time.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/info_parser.hpp>
#include <boost/filesystem.hpp>
#include <boost/foreach.hpp>
#include <boost/thread.hpp>
Now apparently the program only needs library binaries for date_time, filesystem, regex, system and thread.
However, I am getting a link error looking for the serialization library.
LINK : fatal error LNK1104: cannot open file ‘libboost_serialization-vc100-mt-gd-1_44.lib’
I have two questions:
- What header file above requires the serialization library?
- Where can I find a list of headers that require binary libraries (along with which library they are associated with) and which ones are header-only? I have looked for quite a while and can’t seem to find it.
It’s possible that either
Boost.PropertyTreeorBoost.DateTimeare asking for thelibboost_serialization. Both Boost.PropertyTree and Boost.DateTime libraries support integration withBoost.Serialization, so one of them could be requiring that the serialization library be linked. My money’s onBoost.PropertyTree, because the above link for date/time specifies that you must explicitly include the serialization headers to get support for it, so it’s unlikely thatBoost.DateTimewould need the serialization library unless you include those files.Here’s a list of those Boost libraries which support automatic linking, so they require linking to library files. Here is the list of header-only libraries. I’m not sure if the union of both sets forms the whole boost library, but it seems pretty complete.