Robert Bed
Robert Bed

Reputation: 233

error: expected ')' before 'CLLocation'

i get this error:

error: expected ')' before 'CLLocation'

with this code:

@protocol MyCLControllerDelegate <NSObject>
@required
- (void)locationUpdate:(CLLocation *)location; 
- (void)locationError:(NSError *)error;
@end

@interface MyCLController : NSObject <CLLocationManagerDelegate> {
    CLLocationManager *locationManager;
    id delegate;
}

@property (nonatomic, retain) CLLocationManager *locationManager;
@property (nonatomic, assign) id <MyCLControllerDelegate> delegate;

- (void)locationManager:(CLLocationManager *)manager
    didUpdateToLocation:(CLLocation *)newLocation
           fromLocation:(CLLocation *)oldLocation;

- (void)locationManager:(CLLocationManager *)manager
       didFailWithError:(NSError *)error;

@end

the code, I think is well, the problem I think is the library, but I added the framework previously but doesn't work.

What can be the problem ?

Upvotes: 2

Views: 761

Answers (1)

Dan Ray
Dan Ray

Reputation: 21903

Have you imported it?

At the top of the file, go:

#import <CoreLocation/CoreLocation.h>

Upvotes: 7

Related Questions