xcode 没有要编译的架构(ONLY_ACTIVE_ARCH=YES,active arch=x86_64,VALID_ARCHS=armv7 armv7s)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12889065/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=armv7 armv7s)
提问by Edward Chiang
Running in Xcode is correctly, but when I want to use command line with $ /usr/bin/xcodebuild -scheme projectA -workspace projectA.xcworkspace -configuration Debug clean build
在 Xcode 中运行是正确的,但是当我想将命令行与 $ /usr/bin/xcodebuild -scheme projectA -workspace projectA.xcworkspace -configuration Debug clean build 一起使用时
And come up with the following.
并提出以下内容。
=== BUILD NATIVE TARGET projectA OF PROJECT projectA WITH CONFIGURATION Debug ===
Check dependencies
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=armv7 armv7s).
In Build Settings are:
在构建设置中有:
- Architectures: Starndard (armv7, armv7s)
- Base SDK: Latest iOS (iOS 6.0)
- Build Active Architecture Only: Debug Yes, Release No
- Valid Architectures: armv7 armv7s
- 架构:标准(armv7、armv7s)
- 基础 SDK:最新的 iOS (iOS 6.0)
- 仅构建活动架构:调试是,发布否
- 有效架构:armv7 armv7s
After I change Build Active Architecture Only = No
, then the build was BUILD SUCCEEDED.
在我更改Build Active Architecture Only = No
之后,构建成功了。
What is the suggestion setting for this situation, to build success under commend line mode? Thanks.
这种情况的建议设置是什么,在推荐线模式下建立成功?谢谢。
回答by Sertorio Noronha
You can set the "Build Active Architecture Only" and "Archs" values from command line itself. We set ARCHS="armv7 armv7s" ONLY_ACTIVE_ARCH=NO.
您可以从命令行本身设置“Build Active Architecture Only”和“Archs”值。我们设置 ARCHS="armv7 armv7s" ONLY_ACTIVE_ARCH=NO。
Eg
/usr/bin/xcodebuild ARCHS="armv7 armv7s" ONLY_ACTIVE_ARCH=NO -workspace -scheme ......
例如
/usr/bin/xcodebuild ARCHS="armv7 armv7s" ONLY_ACTIVE_ARCH=NO -workspace -scheme ......
This will free you from manually changing the values in your project settings.
这将使您无需手动更改项目设置中的值。
回答by Adobels
In my case it was empty cell in the 'valid architectures' on the target level which resulted in empty 'resolved' cell.
在我的情况下,它是目标级别上“有效架构”中的空单元格,导致空的“已解析”单元格。
That lead to empty 'valid architectures' parameter and at the end linker error.
这会导致空的“有效架构”参数和最后的链接器错误。