Error: expected specifier-qualifier-list before 'CLLocationM


#1

When attempting to compile and test the CoreLocation application Whereami application on page 66 I’m getting this error: expected specifier-qualifier-list before ‘CLLocationManagerDelegate’. In searching the web for the meaning of this error I keep finding references to CoreData but the book doesn’t mention CoreData at all. Am I doing something wrong? Any help would be appreciated.

Thanks,
Rob


#2

Expected specifier-qualifier is a not-so-helpful way of the compiler saying, “I have no idea what you are talking about when you say CLLocationManagerDelegate.”

You will need to add the CoreLocation framework to your project AND import CoreLocation/CoreLocation.h at the top of the header file where you use CLLocationManager delegate.


#3

Thanks for the reply Joe, but I believe that I’ve done that according to the steps outlined in the book.

Rob


#4

Hi,

Try CLLocationManager *locationManager rather than CLLocationManagerDelegate *locationManager.

Gareth


#5

Thank you Gareth. I guess that’s what I get for letting the autocomplete do my thinking for me.