开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜