我的代码是:
- (id)init { if (!(self = [super init])) {
// 初始化成员
locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
locationManager.distanceFilter = 10.0f; // in meters
// 创建委托数组
_delegates = TTCreateNonRetainingArray(); // 就是这里!!!!
statusLocation = LocationInit;
self.currentLocation = nil;
}
return self;
}
链接错误是:
Undefined symbols:
"TTCreateNonRetainingArray()", referenced from:
-[xxxxx init] in xxxxx.o
ld: symbol(s) not found
collect2: ld returned 1 exit status提示的是链接错误,说明头文件包含了,我查过了,TTCreateNonRetainingArray()函数在头文件:TTGlobalCore.h中
对应的库是: libThree20Core.a。库我链接了,加入到 Fromeworks 中。还有什么地方遗漏了吗?
- (id)init { if (!(self = [super init])) {
// 初始化成员
locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
locationManager.distanceFilter = 10.0f; // in meters
// 创建委托数组
_delegates = TTCreateNonRetainingArray(); // 就是这里!!!!
statusLocation = LocationInit;
self.currentLocation = nil;
}
return self;
}
链接错误是:
Undefined symbols:
"TTCreateNonRetainingArray()", referenced from:
-[xxxxx init] in xxxxx.o
ld: symbol(s) not found
collect2: ld returned 1 exit status提示的是链接错误,说明头文件包含了,我查过了,TTCreateNonRetainingArray()函数在头文件:TTGlobalCore.h中
对应的库是: libThree20Core.a。库我链接了,加入到 Fromeworks 中。还有什么地方遗漏了吗?
里面有很多东西要设置,我也不知道你哪里出问题了
1.头文件
2. 看Other Linker Flags中写你需要得静态库名了没有,比如:lXXX
3.看Library Search Path选项,是否把库文件路径加上