Xcode 4 build succeeds, command line build fails?

后端 未结 10 1585
春和景丽
春和景丽 2021-01-30 02:14

I have a project in Xcode 4 (the latest non-beta version) that builds fine when built in Xcode itself. Specifically, the Ld command correctly uses the derived data directory (wh

10条回答
  •  隐瞒了意图╮
    2021-01-30 03:18

    I ran in to the same issue yesterday and was able to work it out. In an effort to narrow down what worked for James, I'll point to what I had to do. I had to add a workspace and switch to running xcodebuild with workspace/scheme instead of project/target.

    Using workspace/scheme forced xcodebuild to use the DerivedData folder instead of the build output folder under the main project. This allowed the linker to find the associated static library.

    This blog post was hugely helpful:

    http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/

提交回复
热议问题