Search code examples
objective-cxcodeclangarchive

Xcode Archive clang: error: cannot specify -o when generating multiple output files


I have a project that I can deploy to my iphone and simulator with no problem. When I try to archive it, I get a error.

Here is XCBuildConfiguration that was requested.

I don't know why i would randomly have this problem. The only changes I have made recently was I added app icon images.


Solution

  • In the Other C Flags build setting there is an -iquote argument that is not followed by the required directory argument. This causes the subsequent -isystem argument in the clang invocation to be interpreted as the directory for the stray -iquote and /Users/ethan/WorkSpace/StudyTree/JASidePanels-master/../Pods/Headers to be interpreted as an additional input file, resulting in the multiple output files error.

    Either remove the -iquote argument from the build setting or add the directory argument.