【问题标题】:xcodebuild uses different configuration than building from within Xcodexcodebuild 使用与在 Xcode 中构建不同的配置
【发布时间】:2012-06-21 06:26:35
【问题描述】:

在命令行中,xcodebuild 提供的结果与在 Xcode UI 中构建不同。

这是我传递的命令行:

$ xcodebuild -sdk iphonesimulator5.0 -configuration Release -scheme mylib -target mylib

注意目标设置为创建静态库文件可能很重要。

我知道正在使用不同的设置,因为我在项目文件中关闭了 -Wundeclared-selector。但是,当我从命令行运行 xcodebuild 时会收到这些警告。

似乎其他人也有这个问题: Why does xcodebuild give different build results than XCode UI

【问题讨论】:

    标签: objective-c xcode build xcodebuild


    【解决方案1】:

    我的机器上安装了多个版本的 Xcode。这修复了它:

    $ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/
    

    【讨论】:

    • 谢谢 Parveen,我一直在为这件事扯头发。您可以将自己的答案标记为正确答案。
    • 我使用了两个不同版本的 Xcode,使用 xcodebuild 构建失败,而 Xcode 构建成功。这节省了我的时间。
    猜你喜欢
    • 2012-05-26
    • 1970-01-01
    • 2011-03-16
    • 2010-12-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-06
    • 1970-01-01
    相关资源
    最近更新 更多