我的实现文件中的常量很少,如下所示:
static const NSInteger kBookSectionCount = 3;
static const NSInteger kBookPopoverHeight = 400;
static NSString *kBookValue = @"Test Value";
我想在我的测试实现文件中引用这些常量。我可以做吗?我尝试如下:
extern const NSInteger kBookSectionCount;
extern const NSInteger kBookPopoverHeight;
extern NSString *kBookValue;
当我尝试上述方式时,我收到以下错误:
Undefined symbols for architecture i386:
"_kBookSectionCount", referenced from:
-[myClassTest testNumberOfSections] in myClass.o
我在这里错过了什么吗?