Hi!
I was wondering if anyone might know why I get the following linking errors when I try to compile and run the Apple CoreLocation sample code:
"_kCLLocationAccuracyKilometer", referenced from:
_kCLLocationAccuracyKilmoeter$non_lazy_ptr in MyLocationGetter.o
and
".objc_class_name_CLLocationManager", referened from:
literal-pointer@__OBJC@__cls_refs@CLLocationManager in MyLocationGetter.o
symbol(s) not found
collect2: ld returned 1 exit status
In my header file, I've imported <CoreLocation/CoreLocation.h> and I've declared locationManager as a class property. The class extends NSObject and conforms to CLLocationManagerDelegate.
My .m file looks like this:
Any help is appreciated, thanks!
I was wondering if anyone might know why I get the following linking errors when I try to compile and run the Apple CoreLocation sample code:
"_kCLLocationAccuracyKilometer", referenced from:
_kCLLocationAccuracyKilmoeter$non_lazy_ptr in MyLocationGetter.o
and
".objc_class_name_CLLocationManager", referened from:
literal-pointer@__OBJC@__cls_refs@CLLocationManager in MyLocationGetter.o
symbol(s) not found
collect2: ld returned 1 exit status
In my header file, I've imported <CoreLocation/CoreLocation.h> and I've declared locationManager as a class property. The class extends NSObject and conforms to CLLocationManagerDelegate.
My .m file looks like this:
Code:
#import "MyLocationGetter.h"
@implementation MyLocationGetter
@synthesize locationManager;
- (void)startUpdates
{
// Create the location manager if this object does not
// already have one.
if (nil == locationManager)
locationManager = [[CLLocationManager alloc] init]; //it appears to have beef with CLLocationManager
locationManager.delegate = self;
locationManager.distanceFilter = 1000; // 1 kilometer
locationManager.desiredAccuracy = kCLLocationAccuracyKilometer; //it appears to have beef with kCLLocationaccuracyKilometer
[locationManager startUpdatingLocation];
}
Any help is appreciated, thanks!