I'm getting “clang: error: no input files”

后端 未结 10 1301
失恋的感觉
失恋的感觉 2020-12-15 15:51

I had a file which I deleted and replaced with another file, somewhere else, of the same name.

Despite cleaning, and trying this multiple times, I keep getting this

10条回答
  •  不思量自难忘°
    2020-12-15 16:15

    In case everything fails (i.e. first try bames53 suggestion)

    Ok, this might be dangerous so make a copy of your whole project first:

    • close Xcode
    • locate the project file in the Finder
    • right click, choose "show package contents"
    • open project.pbxproj in a text editor of your choice, but not Xcode
    • search for your file
      • at the beginning of the line that shows up, you'll see some id like 640450991409CF5C00B3B580. Search for this and delete any line you find.
      • pay attention, not to break the syntax (balance parenthesis and brackets, pay attention for commas)
    • when you are done, save the file and try to open the project in Xcode. Add the missing file via the Add file… dialog of Xcode. It is still in the folder of your project — if you added it successfully in the first place — you just got rid of all project references.
    • dont be surprised, if it doesnt work instantly — you have a copy. copy it again, new try.

    And remember: make a copy of your whole project first — for every try. or copying the project.pbxproj might be enough.

提交回复
热议问题