问题
I'm trying to make a new CLLocation subclass. This is the skeleton:
#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>
@interface JFLocation : CLLocation {
}
@end
#import "JFLocation.h"
@implementation JFLocation
@end
When I build the class I'm getting this errors:
Undefined symbols:
".objc_class_name_CLLocation", referenced from:
.objc_class_name_JFLocation in JFLocation.o
ld: symbol(s) not found
Any Idea?? Thank you!!
回答1:
You should add CoreLocation.framework
to the frameworks used by the project.
Right click on "Frameworks" in the Xcode project. Click Add >
Existing Frameworks...
By default the path should be:
/Developer/Platforms/iPhoneOS.plarform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/Frameworks/CoreLocation.framework
来源:https://stackoverflow.com/questions/1314582/error-on-cllocation-subclassing