boost 1.53.0 をiOS用にビルドする †iOSの開発環境にboostライブラリを追加する方法のメモです。
#!/bin/bash export SDK_NAME=iPhoneOS6.1.sdk export SDK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Dev eloper/SDKs/$SDK_NAME export B2_FLAGS='architecture=arm target-os=iphone link=static threading=multi define=_LITTLE_ENDIAN' export B2_CFLAGS='-fvisibility=default -miphoneos-version-min=5.0' # # build boost # rm -rf stage/lib ./b2 toolset=clang cflags="-arch armv7 $B2_CFLAGS" $B2_FLAGS include=$SDK_PATH/usr/include/ mv stage/lib stage/lib_armv7 ./b2 toolset=clang cflags="-arch armv7 $B2_CFLAGS" $B2_FLAGS include=$SDK_PATH/usr/include/ --clean ./b2 toolset=clang cflags="-arch armv7s $B2_CFLAGS" $B2_FLAGS include=$SDK_PATH/usr/include/ mv stage/lib stage/lib_armv7s ./b2 toolset=clang cflags="-arch armv7s $B2_CFLAGS" $B2_FLAGS include=$SDK_PATH/usr/include/ --clean ./b2 toolset=clang cflags="-arch i386 $B2_CFLAGS" $B2_FLAGS include=$SDK_PATH/usr/include/ mv stage/lib stage/lib_i386 # # marge librarys # mkdir stage/lib for name in $(ls stage/lib_armv7); do lipo -create stage/lib_armv7/$name stage/lib_armv7s/$name stage/lib_i386/$name -output stage/lib/$name done boost 1.49.0 をiOS用にビルドする †Matt.Galloway さんのブログより拝借 http://iphone.galloway.me.uk/2010/09/compiling-boost-1-44-for-iphone/ # <grab source from boost.org> # download boost_1_49_0.tar.gz and extract any directory cd boost_1_49_0 ./bootstrap.sh # Set this to whatever you want to build against SDK_VERSION="4.2" # Install for device: ./bjam --prefix=${HOME}/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS${SDK_VERSION}.sdk/usr toolset=darwin architecture=arm target-os=iphone macosx-version=iphone-${SDK_VERSION} define=_LITTLE_ENDIAN link=static install # Install for simulator ./bjam --prefix=${HOME}/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator${SDK_VERSION}.sdk/usr toolset=darwin architecture=x86 target-os=iphone macosx-version=iphonesim-${SDK_VERSION} link=static install 1.49.0では、SDK4.2までのサポートのようで、5.1にしたらエラーになった。 そのうちrypplでサポートされるかも。 †cmakeのインストール (1.41.0限定) †http://www.cmake.org/cmake/resources/software.html
boostのスタティックライブラリのリンク時の問題 †xxx has different visiblity (default) in ... という warning が大量に出る †
Deviceでビルドしたときにスタティックライブラリがリンクエラーになる場合 †http://blog.slidetorock.com/linking-a-static-library-with-xcode-322-and-s デバイスに転送したPNGファイルが読めない † |