以前的定义在这里 - XCode 4.2.1 中的 Ghost 文件
我在 XCode 中遇到编译错误,其中我从项目中删除的文件显示为类“class_name”的重复接口定义,它显示依赖项的层次结构并最终到达该类的头文件有问题。但该头文件实际上并不存在于项目层次结构中。在头文件代码上方的文件位置部分中,它仅显示 class_name.h > @interface class_name 而不是项目中的每个其他文件:project_name >组名>类名.h >无选择
搜索此对象类型 (cmd+shift+O) 和全局搜索未发现项目中存在此头文件的实例。我已经清理、退出 xcode、重新启动,甚至检查了 proj 文件中是否有此类的实例,但它不在那里。
I'm getting a compile error in XCode where a file that I've removed from the project is showing up as a Duplicate Interface definition for class 'class_name' and it shows the hierarchy of dependencies and ultimately arrives at the header file of the class in question. But that header file doesn't actually exist in the project hierarchy. In the file location section above the header file's code it just shows class_name.h > @interface class_name rather than every other file in the project: project_name > group_name > class_name.h > No Selection
Doing a search for this object type (cmd+shift+O) and global search turn up no instance of this header file existing in the project. I've cleaned, exited xcode, rebooted, even checked the proj file for instances of this class, but it's not there.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我在项目的“标题搜索路径”中拥有类旧位置的路径,因此它看到该文件两次。
I had the path to the old location of my class in my project's "Header Search Paths" so it was seeing the file twice.
第一步:正确管理你的xcode
Header Search Path
,删除未使用的旧搜索路径第二步:选择
product-->clean
First step: properly manage your xcode
Header Search Path
, delete the unused old Search pathSecond step: choose
product-->clean