ios10.1上 交叉编译 boost1_64_0

#以下内容保存为 user-config.jam 放在 /boost_1_64_0/tools/build/src 下
#然后在 /boost_1_64_0根目录打开终端,输入 ./bootstrap.sh, 然后开始编译:
#编译模拟器版
#./bjam -j16 --with-date_time --with-filesystem --with-system --with-thread --build-dir=iphonesim-build --stagedir=iphonesim-build/stage --toolset=darwin-10.1~iphonesim architecture=ia64 target-os=iphone macosx-version=iphonesim-10.1 link=static stage
#编译真机版
#./bjam -j16 --with-date_time --with-filesystem --with-system --with-thread --build-dir=iphone-build --stagedir=iphone-build/stage toolset=darwin architecture=arm target-os=iphone macosx-version=iphone-10.1 define=_LITTLE_ENDIAN link=static stage
#合并 模拟器 和 真机版
#lipo -create iphone-build/stage/lib/libboost_system.a iphonesim-build/stage/lib/libboost_system.a -output libboost_system.a
#lipo -create iphone-build/stage/lib/libboost_thread.a iphonesim-build/stage/lib/libboost_thread.a -output libboost_thread.a


#在xcode 中引用
#Header Search Paths 中添加 boost的 include 目录
#Library Search Paths 中添加 .a文件的目录
#Other Linker Flags 中添加  -lboost_system -lboost_thread
#Build Phasses -> Link Binary With Libraries 中添加 .a文件 




using darwin : 10.1~iphonesim  
: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch i386 -arch x86_64 -DBOOST_SP_USE_PTHREADS -DBOOST_THREAD_DONT_USE_ATOMIC -std=c++11 -stdlib=libc++  
: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer  
: ia64 iphone  
;  
using darwin : 10.1~iphone  
: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -arch armv7s -arch arm64 -DBOOST_SP_USE_PTHREADS -std=c++11 -stdlib=libc++  
: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer  
: arm iphone  
;  

你可能感兴趣的:(IOS)