I just installed boost 1.58 for Visual Studio 12 and created an environment variable BOOST_DIR
for the boost root directory. Furthermore, I added the folder %BOOST_DIR%\stage\lib
to the PATH
environment variable, where all the library files (DLL's + libs) were installed.
Now, in order to test the boost installation, I created a new project and added $(BOOST_DIR)
to the Additional Include Directories. For some reason, this seems to be enough to get the project build and run successfully. For all other libraries, I was used to also include the library directory to Additional Library Directories and add the actually used libraries to Linker -> Input -> Additional Dependencies
.
Could someone please explain to me why this isn't necessary in the case of boost libraries?
This is the sample code I use to test whether boost works:
#include <boost/lambda/lambda.hpp>
#include <iostream>
#include <iterator>
#include <algorithm>
int main()
{
typedef std::istream_iterator<int> in;
std::cout << "Type in any number: ";
std::for_each(
in(std::cin), in(), std::cout
<< (boost::lambda::_1 * 10)
<< "\nType in another number: ");
}