Boostライブラリのビルド

Windowsの場合。VS2010でやりました。

・Boostのコードをダウンロード

・解凍&展開

・VisualStudio コマンドプロンプト(2010)開く(普通のDOS窓でもいけそう)


・コードを展開したフォルダへ CD

・b2.exeをビルド

bootstrap.bat


・b2.exeを以下のように実行。 c:\forboostにインストールする場合

b2 toolset=msvc-10.0 install -j2 --prefix="c:\forboost"

複数バージョンをVSをインストールしているからか toolset=を指定しないとうまくいかんかった


ネタ元


※追記

64bitビルドするときはこうやった。4回に分ける

bjam --toolset=msvc-10.0 link=static runtime-link=shared release stage threading=multi  address-model=64 --stagedir=stage/x64 -j 8 install --prefix="c:\forboost\x64\"

bjam --toolset=msvc-10.0 link=static runtime-link=shared debug stage threading=multi  address-model=64 --stagedir=stage/x64 -j 8 install --prefix="c:\forboost\x64\"

bjam --toolset=msvc-10.0 link=static runtime-link=static release stage threading=multi  address-model=64 --stagedir=stage/x64 -j 8 install --prefix="c:\forboost\x64\"

bjam --toolset=msvc-10.0 link=static runtime-link=static debug stage threading=multi  address-model=64 --stagedir=stage/x64 -j 8 install --prefix="c:\forboost\x64\"

ネタ元