Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<unknown>:0: error: unexpected input file:

I downloaded files from a separate Stack OverFlow post, and dragged the folder into my project (as a group.) The dependancies get resolved and it shows no error for code that relies on the files, but when I try to compile I get this error:

<unknown>:0: error: unexpected input file: /.../xyz.Swift
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

It might be nothing, but the files themselves in the project navigator show up as blank icons (while my project's other file have the swift red spalsh icon) despite checking in as swift files in the attribute inspector.

I've fumbled a few times with adding and deleting multiple sets of files, I checked the local dir and nothing seem out of order... is there something else that might be messing this up?

Thanks for suggestions!

like image 687
John Avatar asked Aug 04 '15 18:08

John


2 Answers

Solved - The issue was with the filename extension:

xyz .Swift will not properly link. It will be processed by xcode and solve code issues expecting it, but the linker will hiccup.

renamed files to xyz .swift -> problem solved.

like image 51
John Avatar answered Oct 06 '22 08:10

John


In my case it was after removing a compiler flag in a way it didn't like. Try to figure out what you changed in your compiler settings before it started acting weird. Sometimes because Xcode caches compiled code the problem doesn't immediately start after doing the change!

like image 33
Lucas van Dongen Avatar answered Oct 06 '22 09:10

Lucas van Dongen