- Visual Studio installed on your system
- Admin Privileges
- [1]: Boost's install guide
- [2]: Additional material
- Download the Boost (See 1. Get Boost described in [1]) archieve and then extract it.
- The location of the extracted file matters and will directly determine the header inclusion and lib linking paths.
- Open as a administrator a Windows Developer Command Prompt,
cdinto extracted boos directory and runbootstrap.bat
- additionally, a particular compiler can be specified:
bootstrap.bat <COMPILER>where compiler is eithergcc(when using linux or mingw,cygwin), msvc (when using windows' visual studio), darwin (when using mac os x).
- (Optional) Move your boost directory to target location (after compiling the source this is no more possible). From now on, let us call boost's location
<boost-path>.
- Advice: Extract boost's content into
C:/boost_my_downloaded_versionsince cmake makes certain assumptions about boost being located there.
- Build Boost via
b2 install. This will take a while.
- There are several build options (see [2]), however, the above command will work on windows when having Visual Studio installed.
- After having built the source successfully, boosts reports us the path to include boost headers and the path to link additional boost libs. The header path is usually equal to
<boost-path>(<HP>) and the linker path (<LP>is usually<boost-path>\stage\lib.
- Start a new visual studio project (e.g. a new win32 console application)
- On the bottom left, click onto Solution Explorer
- Right click onto the project -> Properties
- Assign the header path:
Configuration, Properties-> C/C++ -> General -> Additional Include Directories. - Edit it and add
<HP>(see above) to it. Apply the changes. - then go to
Configuration Properties-> C/C++ -> Precompiled Headersand set the option Precompiled Headers to Not Using Precompiled Headers. - Assign the linker path: Go to
Properties -> Linker -> General -> Additional Library Directoriesand assign<HP>(from above). Apply all changes. - Compiling boost requiring projects via
BUILD -> Build Solutionshould now work.