xcode中接口错误的重复 [英] Duplication of interface error in xcode
问题描述
我什至不知道如何开始.我正在使用核心绘图和核心异步套接字库使用最新的 Xcode
和 sdk 开发 iPhone 应用程序.一切都很好,直到几个小时前,Xcode 无缘无故地抛出了大量接口重复"错误.
发出错误的两个文件是 AsyncSocket.h
和我编写的 API 客户端,以便从目标服务器获取数据.
错误如下:
I am not even sure how to start.
I am developing an iPhone application with the latest Xcode
and sdk using core plot and the core async socket library. Everything was fine until a few hours ago, when Xcode dumped a ton of "interface duplication" errors for no apparent reason.
The two files that are emitting errors are the AsyncSocket.h
and an API client that I wrote in order to get data out of the target server.
The errors are the following:
AsyncSocket.h
和我的 API 客户端中所有枚举的嵌套重定义错误.- 重新声明
AsyncSocket.h
和我的 API 客户端中所有枚举的枚举. AsyncSocket.h
和 API 客户端的接口文件中的接口声明重复.- 在应用程序的两次构建之间发生错误.没有任何在那段时间发生了变化,这就是为什么我什至无法开始思考是什么导致了这种情况.
- Nested Redefinition error on all enums in
AsyncSocket.h
and my API client. - Redeclaration of enum on all enumerations in
AsyncSocket.h
and my API client. - Duplicate interface declaration on the
AsyncSocket.h
and the API client's interface file. - The error occurred between two builds of the application. NOTHING was changed during that time which is why I can't even begin to think what is causing this.
API 客户端是一个非常简单的东西,它只是使用异步套接字向服务器发送查询,然后以数组形式返回解析结果.没什么复杂的,因为我还没有那么喜欢目标 c.
我希望我能提供更多有用的信息,但这就是我所拥有的.
The API client is a really simple thing, it just uses the async socket to send queries to the server and then return the parsed results in arrays. Nothing complicated, as I am not that into objective c yet.
I wish I could give some more useful information but that is all I have.
推荐答案
我相信您的问题源于一个简单的错误.在你开始的头文件中:
i believe your problem results from a simple mistake. In the header file you begin with:
@interface ClassName : SuperclassName
在 .m 文件中时:
@interface ClassName ()
当你忘记括号时,编译器会抱怨.
When you forget the brackets, the compiler complains.
我希望这会有所帮助.祝福您的应用.
I hope this helps. Best wishes with your app.
这篇关于xcode中接口错误的重复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!