xcode 铛:错误:没有这样的文件或目录
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13540973/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
clang: error: no such file or directory
提问by Snowcrash
Added JSONKit to an Xcode project and am getting this error:
将 JSONKit 添加到 Xcode 项目并收到此错误:
clang: error: no such file or directory: '/Users/snowcrash/Downloads/ILGeoNames-develop/SampleApp/../JSONKit/JSONKit.m'
clang: error: no input files
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
However, the JSONKit files do appear to be there. E.g.
但是,JSONKit 文件似乎确实存在。例如
How do I figure out the problem (and fix it!)?
我如何找出问题(并修复它!)?
回答by M.Othman
You need to check Compile resources in the Target Project
您需要检查目标项目中的编译资源
You will Find that
你会发现
JSONKit
JSONKit
is in red color
是红色的
just delete it and go
删除它然后去
回答by Daij-Djan
you have to check 'copy files' when adding the group else they are left where they are and the path breaks when you move the project
您必须在添加组时检查“复制文件”,否则它们会留在原处,并且在移动项目时路径会中断
回答by Scott Lee
I tried re-adding files, but have no work. So, I find the .pbxproj file in .xcodeproj, delete rows include the file name, then rebuild, success!
我尝试重新添加文件,但没有工作。所以,我在.xcodeproj中找到了.pbxproj文件,删除包含文件名的行,然后rebuild,成功!