To use Boost libraries, set following configurations on Visual Studio project properties:
- Check if boost is already installed (eg: C:\Program Files (x86)\boost\boost_1_51_0) if not, go through the installation process on http://www.boost.org/doc/libs/1_52_0/more/getting_started/windows.html
- Ensure BOOST_HOME environment variable exist and points to the installation path above
- On project properties, under C/C++ -> General, add $(BOOST_HOME) to Additional Include Directories
- Under Linker -> General, add $(BOOST_HOME)\lib to Additional Library Directories
- Ensure C/C++ -> Code Generations -> Runtime Library is set to /MD or /MDd so linker can find boost lib files
Some boost component such as boost log need to be built first before it can be linked:
- Unarchive the downloaded compressed file
- Open command prompt in administrator mode and cd into the unarchived directory. Run bootstrap.bat to build b2
- Run b2 install --prefix=PREFIX --toolset=msvc-10.0 --build-type=complete stage. This will take about 30 minutes, be patient. Note: “PREFIX” is the directory you want to install boost (eg: lib). “toolset=msvc-10.0″ means compile boost by using visual studio 2010.