【发布时间】:2012-02-19 17:48:51
【问题描述】:
我正在尝试完成 public static const 的 C 风格版本
我已经尝试过做的事情:
ClassA.h
extern const int FEATURES;
ClassA.m
#define THE_CONST 123
B类.b
#import ClassA.h-
initWithFrameFEATURES
Xcode 不是通过运行时错误,而是通过undefined symbols for architecture i386: "_THE_CONST", referenced from: ... 的构建错误
如何将extern const 分享给其他班级也可以使用?
【问题讨论】:
标签: ios static constants public extern