2011-08-08 13 views
0

それは私がロケーションサービスで働いていると私は、このリンカエラー当たっています最初の時間です:私が追加した- 「i386" アーキテクチャのための未定義のシンボル

Undefined symbols for architecture i386: "_OBJC_CLASS_$_CLLocationManager"

#import <CoreLocation/CoreLocation.h>とあなたがヨーヨーにCoreLocationフレームワークを追加する必要がviewDidLoad

CLLocationManager *manager = [[CLLocationManager alloc] init]; 
manager.delegate = self; 
[manager startUpdatingLocation]; 
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES; 

if (![CLLocationManager locationServicesEnabled]){ 
    UIAlertView *servicesDisabledAlert = [[UIAlertView alloc] initWithTitle:@"Location Services Disabled" message:@"You currently have all location services for this device disabled. If you proceed, you will be asked to confirm whether location services should be reenabled." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; 
    [servicesDisabledAlert show]; 
    [servicesDisabledAlert release]; 
} 
[manager release];     

enter image description here

+1

質問タイトルをよりわかりやすいように編集したい場合があります。 –

+0

はい!すぐにする – Legolas

+0

[未定義のシンボルエラーを解決するには?](http://stackoverflow.com/questions/804510/how-to-resolve-undefined-symbols-error) –

答えて

8

に次の行を追加しましたウルプロジェクト。

+0

私の悪い..... ..... – Legolas

+0

私たちはすべてそこに行った:) –

1

構築する前にコアロケーションフレームワークがプロジェクトにリンクされていることを確認してください。

関連する問題