I'm getting "clang: error: no input files" I'm getting "clang: error: no input files" xcode xcode

I'm getting "clang: error: no input files"


The problem might be because your project > target > Build Phases > Compile Sources is trying to compile a file that doesn't exist. It might be in there twice, like the below screen shot. My project contains UIImage+FFXtras, I can even remove it and re-add it and this won't resolve the problem!

missing source file

I'm not sure how the project gets into this state - but I know it's not obvious what is going wrong. Highlight the red problem one and remove it.

So have a look in compile sources phase for the file clang is complaining about.


Got the similar troubles.

It seems XCode does not generate correct relative filepath when your project refer to an already existing source tree (relative path does not contain the .xcodeproj in the path of the file to be compiled).

There is a simple fix however: in the project explorer select the file or files files then look at the options in the file inspector. One of them is labeled "Location"; set it to absolut path and try again. This fixed the issue for me :)

enter image description here


Additional to all answers:

  1. delete derived data
  2. reboot
  3. delete derived data
  4. clean
  5. build
  6. Success!

Only this sequence works for me in my case.