我有以下头文件
typedef enum {
MONDAY = 1,
TUESDAY = 2,
WEDNESDAY = 3,
THURSDAY = 4,
FRIDAY = 5,
SATURDAY = 6,
SUNDAY = 7,
} WeekDaysEnum;
NSString* dayToString(WeekDaysEnum theDay)
{
switch (theDay) {
case MONDAY:
return @"Monday";
break;
case TUESDAY:
return @"Tuesday";
break;
case WEDNESDAY:
return @"Wednesday";
break;
case THURSDAY:
return @"Thursday";
break;
case FRIDAY:
return @"Friday";
break;
case SATURDAY:
return @"Saturday";
break;
case SUNDAY:
return @"Sunday";
break;
}
}
对于某些函数dayToString
会导致以下错误:
linker command failed with exit code 1
如何dayToString
在 Objective-C.m
文件中调用函数?