Jacksonkr
Jacksonkr

Reputation: 32237

ios public static const equiv

I'm trying to accomplish a C style version of public static const

What I tried doing already:

ClassA.h

ClassA.m

ClassB.b

Xcode does not through a runtime error, but rather a build error of undefined symbols for architecture i386: "_THE_CONST", referenced from: ...

How can I share an extern const to for another class to use as well?

Upvotes: 3

Views: 3500

Answers (1)

Andrey Zverev
Andrey Zverev

Reputation: 4428

ClassA.h

  • extern const int FEATURES;

ClassA.m

  • const int FEATURES = <your const value here>;

Upvotes: 11

Related Questions