質問
iphone sdkを使用して現在の場所を取得しようとしています。コードは次のとおりです。
ビルド時のエラー:
ビルドターゲット“ Send2iPhone”プロジェクトの“ Send2iPhone”設定あり“リリース” — (2エラー) cd / Users / pswenson / dev / send2iphone / iphone_code / Send2iPhone setenv MACOSX_DEPLOYMENT_TARGET 10.5 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/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk -L / Users / pswenson / dev / send2iphone / iphone_code / Send2iPhone / build / Release-iphonesimulator -F / Users / pswenson / dev / send2iphone / iphone_code / Send2iPhone / build / Release-iphonesimulator -filelist /Users/pswenson/dev/send2iphone/iphone_code/Send2iPhone/build/Send2iPhone.build/Send2iPhone build / Release-iphonesimulator / Send2iPhone.build / Objects-normal / i386 / Send2iPhone.LinkFileList -mmacosx-version-min = 10.5 -framework Foundation -framework UIKit -framework CoreGraphics -o / Users / pswenson / dev / send2iphone / iphone_code / Send2iPhone /build/Release-iphonesimulator/Send2iPhone.app/Send2iPhone 未定義のシンボル: " .objc_class_name_CLLocationManager&quot ;、参照元: DetailViewController.oのliteral-pointer @__ OBJC @__ cls_refs @ CLLocationManager " _kCLLocationAccuracyNearestTenMeters&quot ;、参照元: DetailViewController.oの_kCLLocationAccuracyNearestTenMeters $ non_lazy_ptr ld:シンボルが見つかりません collect2:ldが1つの終了ステータスを返しました " .objc_class_name_CLLocationManager&quot ;、参照元: DetailViewController.oのliteral-pointer @__ OBJC @__ cls_refs @ CLLocationManager " _kCLLocationAccuracyNearestTenMeters&quot ;、参照元: DetailViewController.oの_kCLLocationAccuracyNearestTenMeters $ non_lazy_ptr ld:シンボルが見つかりません collect2:ldが1つの終了ステータスを返しました ビルドに失敗しました(2つのエラー)
私は無知です...何かアイデアはありますか?
解決
CoreLocationライブラリをプロジェクトに追加しましたか?リンクに問題があるように見えます。これは通常、プロジェクトに必要なライブラリがすべて揃っていないことを意味します。