我正在尝试在我的应用中实现CLLocationManager
,并且我收到以下编译时错误。
视图控制器的viewDidLoad
方法中的代码:
self.locationManager = [[CLLocationManager alloc] init];
self.locationManager.delegate = self;
self.locationManager.desiredAccuracy = kCLLocationAccuracyBest;
错误:
_OBJ_CLASS_$_CLLocationManager," referenced from Obj-c-class-ref in AboutLocationViewController.o
_kCLLocationAccuracyBest," referenced from:
-[AboutLocationViewController viewDidLoad] in AboutLocationViewController.o
Symbol(s)not found for architecture arm7
Collect2: Id returned 1 exit status
答案 0 :(得分:8)
您可能尚未在Frameworks文件夹中添加CoreLocation.framework。因此,链接器无法找到CLLocationManager类。