I am trying to build a static library to target armv7.
I am using the following command in a bash script:
$XCODEBUILD -project 'MyLibrary.xcodeproj' -target "MyLibrary" -configuration 'Release' -sdk 'iphoneos7.0' clean build ARCHS='armv7 armv7s' IPHONEOS_DEPLOYMENT_TARGET='5.0' TARGET_BUILD_DIR='./build-arm' BUILT_PRODUCTS_DIR='./build-arm'
I cannot link to the resulting lib. I get linker error:
file was built for archive which is not the architecture being linked (armv7s): ~/MyProject/MyProject/libMyLibrary.a
Is something wrong with the way I am building the binary?
Any help would be appreciated.
Update The target that I am trying to build (the application linking to the lib) has the following settings:
Check Build Settings (for the target you are trying to build!) - make sure that both Architectures
and Valid Architectures
are set to the same values.