I deleted the file and Xcode is giving Clang error

I imported the file (tlb.c), but then I (intentionally) deleted it. Now when I run the project, Xcode gives clang error and says that it is because it cannot find "tlb.c". I haven't edited any of the original files to link to it, so I see no reason why this error would be thrown.

I removed it because I realized that I hadn't downloaded the .h file that came with it. I cleaned the project and completely restarted Xcode several times.

Here is my mistake:

clang: error: no such file or directory: '/Users/Tom/Desktop/Test64iOS Resource/Test64iOS/tlb.c'
clang: error: no input files
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1



source to share

2 answers

Have you deleted the file from your project and also deleted it from disk? If you failed to remove, if from the project you will still see its project navigator, except that the font will be red.

If that's not your problem, select the project root in the Project Navigator and select Build Phases. There is a section "Compiling sources". See if the file is listed and delete it.



Just ran into this issue on Xcode 9.1, I checked the Compilation Sources section but no file was listed. I cleaned the project several times, tried to find a file on my computer to restore it (it was not found anywhere).

Finally, I just got out of Xcode and returned. The error is gone.



All Articles