2012-02-15 40 views
0

測試MYAPP我用xcode4開發基地地圖應用程序, 我設定的區域使用MKCoordinateRegionMakeWithDistance像如下:得到一個錯誤味精當iPod上

self->map.hidden=NO; CLLocationCoordinate2D loc = CLLocationCoordinate2DMake([[NSNumber numberWithFloat:34.923964] doubleValue],[[NSNumber numberWithFloat:-120.219558] doubleValue]);

NSLog(@"%f",[[NSNumber numberWithFloat:34.923964] doubleValue]);

MKCoordinateRegion reg = MKCoordinateRegionMakeWithDistance(loc,[[NSNumber numberWithFloat:1000] doubleValue],[[NSNumber numberWithFloat:1000] doubleValue]);

self->map.region = reg;

當我試圖運行tes的東西,我寫T,我得到這個消息:

Undefined symbols for architecture armv7: "_CLLocationCoordinate2DMake", referenced from: -[MapViewController viewDidAppear:] in MapViewController.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

是什麼消息呢?

回答

11

這可能是一個愚蠢的問題,但是你在項目中包含了CoreLocation框架嗎?

+1

你是對的,我忘了添加CoreLocation框架 – timger 2012-02-17 03:51:49

+2

人們忘記了事情,這不是愚蠢的。 – jturolla 2013-06-18 21:46:41

1

它沒有爲arm7找到CoreLocation的庫。可能是一個損壞的Xcode安裝。我會建議刪除它,然後重新安裝乾淨。

相關問題