我试图使用两个init方法来创建CLLocation对象,但它没有创建,也没有给出错误。下面是几行代码:
CLLocationCoordinate2D locCor = userLoc.coordinate;
CLLocation *locloc = [CLLocation alloc initWithLatitude:userLoc.coordinate.latitude longitude:userLoc.coordinate.longitude;
下面是我得到的错误
"_OBJC_CLASS_$_CLLocation",引用自:
objc-class-ref-to-CLLocation in MyMap.old:找不到符号
collect2: ld返回了1个退出状态
请帮帮忙,我不知道为什么会这样。我使用的是XCode版本3.2.4。是不是跟版本有关?
提前谢谢。
发布于 2010-11-11 10:58:07
确保对CoreLocation框架执行#import和链接。
https://stackoverflow.com/questions/4151011
复制相似问题