Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

xcode

clang

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 error:

clang: error: no such file or directory: '/Users/Andrew/App/Version 1.1/XCode/UIImage+Alpha.m' clang: error: no input files

I can't continue working on my app because of it. Any ideas?

like image 677
Andrew Avatar asked Jul 05 '12 21:07

Andrew


People also ask

How to fix clang error no input files?

You can either navigate to the folder, right-click and open a terminal, or use the cd command to navigate the folder tree inside the terminal. Regardless, once you're in the same directory as the script, try running it, and it should work just fine, provided there were no other bugs in the code.

What is clang error?

At the time of linking process , compiler(here clang) cannot link power function to its definition so linker throws the error in this kind of situation. If you define int power(int x, int y) { \*do calculation*/ } Then linker can link your declaration of power function to its definition ,you will not get any error.


1 Answers

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.

like image 79
bandejapaisa Avatar answered Sep 19 '22 02:09

bandejapaisa