Using #import or #include
In documentation:"Objective-C adds the #import directive, which does the same thing, except that it knows not to insert a file which has already been inserted."
But I'm get a error, when try:
And get ERROR: duplicate symbol SOME_VARIABLE
But I'm get a error, when try:
// ClassA.h
#import <Foundation/Foundation.h>
int SOME_VARIABLE = 1;
@interface ClassA : NSObject {
}
@end
--------------------------------------------------------
// ClassB.h
#import <Foundation/Foundation.h>
#import "ClassA.h"
@interface ClassB : NSObject {
}
@end
And get ERROR: duplicate symbol SOME_VARIABLE
MacBook m403, Mac OS X (10.5.5)