-
Download the latest version of boost from www.boost.org. The current version at the time of this writing is 1.51.0.
-
Extract the contents of the zip.
-
Execute ‘bootstrap.bat’
-
Open “Visual Studio Command Prompt 20xx”
-
cd over to the main boost folder
-
Execute the command:
b2 --toolset=msvc-10.0 --build-type=complete stage
However, if you have multiple cores you can add this to the end of the command ‘-jN’ where ‘N’ is the number of threads.
6a. (optional – use a separate boost folder) For x86_x64:
b2 --toolset=msvc-10.0 --with-serialization --build-type=complete architecture=x86 address-model=64
6b. (optional) Building with zlib support
-sZLIB_SOURCE="C:\zlib-1.2.8"
6c. (optional) Building with bzip2 support
-sBZIP2_SOURCE="C:\bzip2-1.0.6"
-
Create a new ‘Win32 Console Application’ project.
-
Right click on the project name (left side) and choose Properties.
-
Click VC++ Directories.
-
Edit the ‘Include Directories’ to have the main boost folder. So if boost is located in ‘C:\boost_1_51_0’ you would include that directory.
-
Edit the ‘Library Directories’ to have the folder ‘stage\lib’. This is located within the boost folder.
-
You may now use the boost C++ libraries!
Build with XP support for VS2013:
b2 --toolset=msvc-12.0_xp define=BOOST_USE_WINAPI_VERSION=0x0501 --build-type=complete stage