You first need to compile boost...
Click on start button, locate Visual Studio folder in start menu and select following:
x64 Native tools command prompt
Assuming you have extracted boost zip file into
C:\dev example:
C:\dev\boost_1_73_0
cd into boost root folder inside command prompt,
Alternatively copy paste following command into developer command prompt:
cd C:\dev\boost_1_73_0
and insert following command to compile x64 debug DLL version of boost:
hit enter and wait to complete, then this command: (update the command as needed)
.\b2 -j 4 --build-dir="C:\dev\boost_1_73_0\build" --stagedir="C:\dev\boost_1_73_0\stage" variant=debug link=shared address-model=64 runtime-link=shared threading=multi toolset=msvc-14.2 --without-graph_parallel --without-mpi |
This will take some time approx 5-10 min.
When done you need to configure your project to use boost,
add new project property sheet to your project and following user macro under
Common properties -> User macros -> Add macro (Name/value):
BOOST_ROOT
C:\dev\boost_1_73_0
Next:
Common properties -> C\C++ -> General -> Additional include directories
add following:
$(BOOST_ROOT)
Under
Common properties -> C\C++ -> Preprocessor -> preprocessor directives
add following:
BOOST_ALL_DYN_LINK
Setup linker:
Common properties -> Linker -> General -> Additional library directories
insert this:
$(BOOST_ROOT)\stage\lib
That's it, your project is now ready to use boost.
Make sure you save your property sheet somewhere, so that when you create new project you only need to add this existing property to project with no additional configuration needed.
Next time when you compile new version of boost you only need to update
BOOST_ROOT user macro in your property sheet.