Undefined character error in Xcode 4.0.1 regarding CoreLocation structure

I am working on the first Core Data tutorial, "Locations". I completed the first part of the tutorial, which sets up the NavigationController and TableViewController, and also adds CoreLocation calls for the delegate. When I create / run, I get the following error:

Ld /Users/parradoxx/Library/Developer/Xcode/DerivedData/Locations-dbbkuqswxbvwszevbplxgtcndmeo/Build/Products/Debug-iphonesimulator/Locations.app/Locations normal i386 cd /Users/parradoxx/Projects/Locations setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/Users/parradoxx/Library/Developer/Xcode/DerivedData/Locations-dbbkuqswxbvwszevbplxgtcndmeo/Build/Products/Debug-iphonesimulator -F/Users/parradoxx/Library/Developer/Xcode/DerivedData/Locations-dbbkuqswxbvwszevbplxgtcndmeo/Build/Products/Debug-iphonesimulator -F/Users/parradoxx/Projects/Locations -filelist /Users/parradoxx/Library/Developer/Xcode/DerivedData/Locations-dbbkuqswxbvwszevbplxgtcndmeo/Build/Intermediates/Locations.build/Debug-iphonesimulator/Locations.build/Objects-normal/i386/Locations.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework CoreLocation -framework UIKit -framework Foundation -framework CoreGraphics -framework CoreData -o /Users/parradoxx/Library/Developer/Xcode/DerivedData/Locations-dbbkuqswxbvwszevbplxgtcndmeo/Build/Products/Debug-iphonesimulator/Locations.app/Locations Undefined symbols for architecture i386: "_OBJC_CLASS_$_CLLocationManager", referenced from: objc-class-ref in RootViewController.o ld: symbol(s) not found for architecture i386 collect2: ld returned 1 exit status 

I read similar posts about the need to bind a CoreLocation structure, and I have, as far as I know. In fact, it has been in the Frameworks directory twice for some time. However, I suspect this is a problem with the linker, and this has turned upside down. Where I see the confusion, these are MACOS links when it is intended for iOS.

I have successfully used Xcode 4 since it became available. This is my first hiccup with Xcode, and it leaves me a little lost. I am pleased to provide further information upon request.

+7
source share
2 answers

Linking to CoreLocation.framework is very simple. In Xcode4, click the icon for your project at the top of the left column (project navigator) to view the assembly phases in the main area. On the Phase Build tab, expand the Link Binaries to Libraries tab. Click on the + sign to select CoreLocation.framework from the list. What is it!

+16
source

RightClick on the project icon (xcode), then select the show in the folder. You will find a framework called CoreLocation.framework, just drag it into the Frameworks folder in the list of project files (xcode). Remember to add #import and CLLocationManagerDelegate to your .h file :-)

0
source