为 Boost Bjam iOS 指定 IPHONEOS_DEPLOYMENT_TARGET
Specifying IPHONEOS_DEPLOYMENT_TARGET for Boost Bjam iOS
我使用这个项目为 iOS 构建提升:https://github.com/danoli3/ofxiOSBoost/blob/master/scripts/build-libc%2B%2B
我的客户项目设置为:
IPHONEOS_DEPLOYMENT_TARGET = 7.0
Base SDK = 9.2
当我 link 针对 boost 框架时,我收到以下警告。
ld: warning: object file ((error_code.o)) was built for newer iOS version (9.2) than being linked (7.0)
ld: warning: object file ((future.o)) was built for newer iOS version (9.2) than being linked (7.0)
ld: warning: object file ((once.o)) was built for newer iOS version (9.2) than being linked (7.0)
ld: warning: object file ((thread.o)) was built for newer iOS version (9.2) than being linked (7.0)
如何更改 boost bjam 的部署目标?或者有没有办法修复这些警告?
在您引用的脚本中像这样将标志“-miphoneos-version-min=7.0”添加到用户-config.jam。
updateBoost()
{
echo Updating boost into $BOOST_SRC...
cp $BOOST_SRC/tools/build/example/user-config.jam $BOOST_SRC/tools/build/example/user-config.jam.bk
cat >> $BOOST_SRC/tools/build/example/user-config.jam <<EOF
using darwin : ${IPHONE_SDKVERSION}~iphone
: $XCODE_ROOT/Toolchains/XcodeDefault.xctoolchain/usr/bin/$COMPILER -arch armv7 -arch armv7s -arch arm64 -fvisibility=hidden -miphoneos-version-min=7.0 - fvisibility-inlines-hidden $EXTRA_CPPFLAGS
: <striper> <root>$XCODE_ROOT/Platforms/iPhoneOS.platform/Developer
: <architecture>arm <target-os>iphone
;
using darwin : ${IPHONE_SDKVERSION}~iphonesim
: $XCODE_ROOT/Toolchains/XcodeDefault.xctoolchain/usr/bin/$COMPILER -arch i386 -arch x86_64 -fvisibility=hidden -miphoneos-version-min=7.0 -fvisibility-inlines-hidden $EXTRA_CPPFLAGS
: <striper> <root>$XCODE_ROOT/Platforms/iPhoneSimulator.platform/Developer
: <architecture>x86 <target-os>iphone
;
EOF
doneSection
}
我使用这个项目为 iOS 构建提升:https://github.com/danoli3/ofxiOSBoost/blob/master/scripts/build-libc%2B%2B
我的客户项目设置为:
IPHONEOS_DEPLOYMENT_TARGET = 7.0
Base SDK = 9.2
当我 link 针对 boost 框架时,我收到以下警告。
ld: warning: object file ((error_code.o)) was built for newer iOS version (9.2) than being linked (7.0)
ld: warning: object file ((future.o)) was built for newer iOS version (9.2) than being linked (7.0)
ld: warning: object file ((once.o)) was built for newer iOS version (9.2) than being linked (7.0)
ld: warning: object file ((thread.o)) was built for newer iOS version (9.2) than being linked (7.0)
如何更改 boost bjam 的部署目标?或者有没有办法修复这些警告?
在您引用的脚本中像这样将标志“-miphoneos-version-min=7.0”添加到用户-config.jam。
updateBoost()
{
echo Updating boost into $BOOST_SRC...
cp $BOOST_SRC/tools/build/example/user-config.jam $BOOST_SRC/tools/build/example/user-config.jam.bk
cat >> $BOOST_SRC/tools/build/example/user-config.jam <<EOF
using darwin : ${IPHONE_SDKVERSION}~iphone
: $XCODE_ROOT/Toolchains/XcodeDefault.xctoolchain/usr/bin/$COMPILER -arch armv7 -arch armv7s -arch arm64 -fvisibility=hidden -miphoneos-version-min=7.0 - fvisibility-inlines-hidden $EXTRA_CPPFLAGS
: <striper> <root>$XCODE_ROOT/Platforms/iPhoneOS.platform/Developer
: <architecture>arm <target-os>iphone
;
using darwin : ${IPHONE_SDKVERSION}~iphonesim
: $XCODE_ROOT/Toolchains/XcodeDefault.xctoolchain/usr/bin/$COMPILER -arch i386 -arch x86_64 -fvisibility=hidden -miphoneos-version-min=7.0 -fvisibility-inlines-hidden $EXTRA_CPPFLAGS
: <striper> <root>$XCODE_ROOT/Platforms/iPhoneSimulator.platform/Developer
: <architecture>x86 <target-os>iphone
;
EOF
doneSection
}