鶫をビルドしてみる(2)
(2) 各種ライブラリをビルドする
(2)-2. boostをビルド
(2)-2-1.
BoostLibrary(http://www.boost.org/)のダウンロードページ(http://sourceforge.net/projects/boost/files/boost/1.43.0/)から、boost_1_43_0.zipをD:\libにダウンロード、保存。
解凍すると、boost_1_43_0ディレクトリが作成される。(D:\lib\boost_1_43_0)
次に、http://sourceforge.net/projects/boost/files/boost-jam/3.1.18/からboost-jam-3.1.18-1-ntx86.zipをD:\libにダウンロード、保存。
解凍し、bjam.exeをD:\libに置く。(D:\lib\bjam.exe)
(2)-2-2.
D:\lib\boost_1_43_0\tools\build\v2\user-config.jamをエディタで開き、以下の記述を追加する。
using msvc : 10.0 : C:/Program\ Files/Microsoft\ Visual\ Studio\ 10.0/VC/bin/cl.exe ;
(2)-2-3.
コマンドプロンプトを起動し、D:\lib\boost_1_43_0 にカレントディレクトリを移動。
cd D:\lib\boost_1_43_0
次のコマンドを入力し、ライブラリをビルドする。
# debugビルド用
..\bjam.exe --toolset=msvc-10.0 variant=debug threading=multi link=static runtime-link=shared stage --with-date_time --with-filesystem --with-regex --with-thread
# releaseビルド用
..\bjam.exe --toolset=msvc-10.0 variant=release threading=multi link=static runtime-link=shared stage --with-date_time --with-filesystem --with-regex --with-thread
(2)-3. ICUをビルド
(2)-3-1.
ICU homepage(http://site.icu-project.org/)のダウンロードページ(http://icu-project.org/download/4.4.html#ICU4C)から、icu4c-4_4_1-src.tgzを D:lib にダウンロードして保存。
解凍すると、 icu ディレクトリが作成される。(D:\lib\icu)
(2)-4. wxWidgetsをビルド
(2)-4-1.
http://www.wxwindows.org/downloads/ から、wxMSW-2.8.11-Setup.exe をダウンロード。実行し、D:\wxWidgets-2.8.11 にインストール。
D:\wxWidgets\include\wx\msw\setup.h、D:\wxWidgets-2.8.11\build\msw\config.vcを以下のように編集。
※config.vcの編集はmake時にUSE_GDIPLUSを指定すればいらないかも……?
$ setup.h
line 579: #define wxUSE_GRAPHICS_CONTEXT 1
$ config.vc
line 114: USE_GDIPLUS = 1
(2)-4-1.
コマンドプロンプトを起動し、D:\wxWidgets-2.8.11\build\msw に移動。
cd D:\wxWidgets-2.8.11\build\msw
次のコマンドを打ち込み、ライブラリをビルド。
nmake -f makefile.vc SHARED=1 UNICODE=1 USE_GDIPLUS=1 BUILD=debug
nmake -f makefile.vc SHARED=1 UNICODE=1 USE_GDIPLUS=1 BUILD=release
(2)-5. パスを通す。
vsvars32.bat の中に以下を記述しておく
@set WX_DIR=D:\wxWidgets-2.8.11
@set BOOST_DIR=D:\lib\boost_1_43_0
@set ICU_DIR=D:\lib\icu_vc10
(2)-6. おわりに
現在のディレクトリ構成
/C:
┣/Program files
┃ ┗/Microsoft Visual Studio 10.0
┃ ┗/Common7
┃ ┗/Tools
┃ ┗/vsvars32.bat ... 編集すると便利
┃
.../D:
┣/cygwin ... TortoiseHgインストールディレクトリ
┣/Python26 ... Pytonインストールディレクトリ
┣/lib ... Pytonインストールディレクトリ
┃ ┣/boost_1_43_0 ... boost library directory
┃ ┃ ┣/boost ... include directory
┃ ┃ ┗/stage/lib ... library file directory
┃ ┣/icu ... ICU source directory
┃ ┗/icu_vc10 ... library file directory
┣/wxWidgets-2.8.11 ... wxWidgets directory
┃
...
Next:(3) 鶫のソースコードをダウンロード
Prev:(1) ビルドするための環境を構築