Xcode 4 build succeeds, command line build fails?

后端 未结 10 1617
春和景丽
春和景丽 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 02:53

    Personally, I had this issue when I was developing a static library. I had the static library target with all the production code, and a test target that pulled in the MyStaticLib.a file as a framework.

    Tests ran just fine in Xcode, but not in the terminal using xcodebuild. The problem ended up being that the static library target was compiling for Standard architectures, while the test target wanted to compile for Standard architectures (including 64-bit). Switching the test target to Standard architectures fixed everything.

提交回复
热议问题