How do I include Boost libraries?
First you should read about the difference between #include "filepath"
and #include <filepath>
here.
Personally, I'm working with Boost from Visual Studio as follows:
- Go to Project properties → C/C++ → General → Additional Include Directories, and add a path to the
boost
library root (in my caseC:\Program Files (x86)\Boost_1_53
). - Include a .hpp file in your sources, like
#include <boost/lexical_cast/lexical_cast_old.hpp>
If you're using non headers-only libraries you should also add path to Boost libraries in Project properties → Linker → General → Additional Libraries Directories.