Location Manager error

I am using location manager

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_CLLocationManager", referenced from:
      objc-class-ref in ViewController.o
  "_kCLLocationAccuracyHundredMeters", referenced from:
      -[ViewController viewDidLoad] in ViewController.o
  "_kCLDistanceFilterNone", referenced from:
      -[ViewController viewDidLoad] in ViewController.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status

I added corelocation.framework into frameworks folder of my project, the project is success on cleaning but failed and give the same three errors on building

Answers


You need to import Framework Which you have already done also add the following to your .h file where you are using the CLLocation class such as

#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>

@interface UntitledViewController : UIViewController <CLLocationManagerDelegate> {
    CLLocationManager*      locationManager;
    CLLocation*             locationObject;
}

@end

Hope it helps!!


Need Your Help

DLL locked - Visual Studio 2010 C++

c++ windows git visual-studio-2010 dll

I’m currently logged onto a machine and my current problem involves a custom build step that has trouble copying a .dll to the Bin directory because Windows says it cannot access the file because i...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.