Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dusker

macrumors member
Original poster
May 31, 2009
41
0
Hi,
i tried build a very simple app that uses CoreLocation to display the current position. I did everything according to a book i follow, and i keep getting two errors:

".objc_class_name_CLLocationManager", referenced from:
literal-pointer@__OBJC@__cls_refs@CLLocationManager in GpsTestViewController.o

and

_kCLLocationAccuracyBest$non_lazy_ptr in GpsTestViewController.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

here's the entire project zipped if anyone would like to take a look: http://iapp.pl/code/GpsTest.zip
any help will be greatly appreciated

greetings
peter
 
This is a linker error. You have incorrectly referenced CoreLocation.framework. Delete it from your project file, then add it in XCode again. This time, deselect the copy checkbox, and make sure it is referenced "relative to current SDK".

You also need a space in the delegate method name. It's "manager didUpdateToLocation" not "managerdidUpdateToLocation". If you don't have the space, it won't get called.

I'd also recommend using an NSNumberFormatter on the coordinates.
 
ahhh there's the error! Thank you very very much i really appreciate this!
Cheers!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.