[英]C ENUM Not Recognizing In Xcode iOS Dev Project
Is there a Build Setting to allow normal C enums to work in Xcode? 是否有构建设置以允许普通C枚举在Xcode中工作? Please don't tell me to use typedef techniques.
请不要告诉我使用typedef技术。 I need to use straight up old fashion enums.
我需要直接使用旧的时尚枚举。 I have a legacy project that uses them just fine, but when I import the classes into a new project, it throws errors saying my enums are undefined.
我有一个可以很好地使用它们的旧项目,但是当我将这些类导入到新项目中时,它抛出错误,表明我的枚举未定义。
I use a simple Global.h to include them in all the complaining classes. 我使用一个简单的Global.h将它们包括在所有抱怨的类中。 My implementation is extremely basic:
我的实现非常基础:
enum {
state1,
state2
};
Clues? 线索?
It's been a while and I don't have ac compiler on my iPad to test it, but try: 已经有一段时间了,我的iPad上没有交流编译器进行测试,但是请尝试:
enum states {
state1,
state2
};
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.