Cannot create CLLocation object
I am trying to create CLLocation object by using both init methods but its not creating and giving the error. Below is the lines of code:
CLLocationCoordinate2D locCor = userLoc.coordinate;
CLLocation *locloc = [[CLLocation alloc] initWithLatitude:userLoc.coordinate.latitude longitude:u开发者_JS百科serLoc.coordinate.longitude;
Below is the error i am getting
"_OBJC_CLASS_$_CLLocation", referenced from:
objc-class-ref-to-CLLocation in MyMap.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Please help, I don't know why its coming. I am using XCode version 3.2.4. Is it something to do with the version?
Thanks in advance.
Make sure to #import
and link against the CoreLocation
framework.
精彩评论