Build boost in visual studio with Bzip

IRC on the Apple //c

Figuring out the correct magic incantation to compile the C++ boost library with Microsoft Visual Studio 2013 is somewhat of a magical trip. It is even worse if you want to include bzip for compression access. Add on top of that wanting to have x86 and x64 versions and you have a mess!

Here is what I was able to figure out:

First download Bzip from http://bzip.org/ and uncompress the source code.

then inside of the visual studio tools command prompt (the 64 bit version for 64 bit and 32 for 32 bit) run the following commands:


.\bjam.exe -s NO_COMPRESSION=0 -s NO_BZIP2=0 -s BZIP2_SOURCE=<path-to-bz> --stagedir=.\stage\x64 --toolset=msvc-12.0 architecture=x86 address-model=64 -j8 --build-type=complete

and

.\bjam.exe -s NO_COMPRESSION=0 -s NO_BZIP2=0 -s BZIP2_SOURCE=<path-to-bz> --stagedir=.\stage\x86 -j8 --build-type=complete

If you are using a different version of visual studio, the toolset will be different. This site has the version numbers.

Good luck, and after you get it compiled remember, here be dragons Here be Dragons