3

I use this project to build boost for iOS: https://github.com/danoli3/ofxiOSBoost/blob/master/scripts/build-libc%2B%2B

My client project is set with:

IPHONEOS_DEPLOYMENT_TARGET = 7.0
Base SDK = 9.2

I get the following warnings when I link against the boost framework.

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)

How do I change the deployment target for boost bjam? or is there a way to fix these warnings?

ssk
  • 9,045
  • 26
  • 96
  • 169

1 Answers1

2

Add the flag "-miphoneos-version-min=7.0" to the user-config.jam like this in the script you have referenced.

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
}
adsun
  • 773
  • 9
  • 30