Xcode 5 Command Line: invalid deployment target &#

2019-05-29 07:58发布

I'm building a fat Crypto++ library from the command line under Xcode 5 with the iOS 7 SDK. The iOS 7 SDK includes the arm64 target. All goes well for the armv7 and armv7s architectures, but arm64 is a different matter:

clang++ -DNDEBUG -g -Os -pipe -fPIC -DCRYPTOPP_DISABLE_ASM -arch arm64
--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk
-Wno-tautological-compare -Wno-unused-value -c 3way.cpp
error: invalid deployment target '3.0.0' for architecture 'arm64' (requires '7.0.0' or later)
1 error generated.
make: *** [3way.o] Error 1

I've never experienced the error before, and searching produced no hits. Any ideas on how to proceed?

Thanks in advance.

3条回答
Animai°情兽
2楼-- · 2019-05-29 08:46

Try /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++

查看更多
▲ chillily
3楼-- · 2019-05-29 08:51

Add the command line option:

-mios-version-min=7.0.0

or:

-miphoneos-version-min=7.0.0

See this clang reference.

查看更多
Summer. ? 凉城
4楼-- · 2019-05-29 08:55

Remove the armv64 from vaild - architure in build setting and run the project

enter image description here

查看更多
登录 后发表回答