I have a BConstants.h
file where I put all the constants for my project. The file is the following:
#ifndef asdf_BConstants_h
#define asdf_BConstants_h
typedef NS_ENUM(NSUInteger, BTheme) {
kField
};
typedef NS_ENUM(NSUInteger, BItem) {
kBox
};
typedef NS_ENUM(NSUInteger, BMovementState) {
kTouchUp,
kTouchDown
};
#endif
When I add the following three lines to this file, I receive the subsequent errors when the file is #import
ed to another .m
file
...
NSString * const kHero = @"Hero";
NSString * const kCount = @"Count";
#endif
Errors:
duplicate symbol _kHero in:
...list of .o files
duplicate symbol kCount in:
...list of .o files
2 duplicate symbols for architecture arm64
I have looked at questions already post on SO that state I may have duplicate files in my compile sources
of the application target
, but I checked and I found no duplicate files. Where else can this problem stem from, is it the inclusion of those 2 NSString constants in the BConstants.h
file?