Xcode 4 build succeeds, command line build fails?

后端 未结 10 1774
春和景丽
春和景丽 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:57

    All of a sudden I got the same problem after a Clean, at first I panicked wen I watched:

    linker command failed with exit code 1 (use -v to see invocation)

    ... but it turned to be really easy to fix, no command line needed!

    I clicked on my project's root (the one on the top with the blueprint icon with an "A") in the Navigator, then clicked the PROJECT section (you can click on the TARGET section as well) and then clicked the button in the bottom-middle called "Validate Settings".

    XCode itself validated the project files and told me that the problem was a duplicated target definition, and offered to fix it... and voilá, the problem its gone!

    Good luck!

提交回复
热议问题