4

CLLocationManager を使用しています。

このコンパイルエラーが発生しました:

Ld /Users/Teguh/Library/Developer/Xcode/DerivedData/BadgerNew-bjopcgcgsjkcvcevflfbvsjwfgnu/Build/Products/Debug-iphonesimulator/BadgerNew.app/BadgerNew normal i386
    cd /Users/Teguh/Dropbox/badgers/BadgerNew
    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-g++-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/Users/Teguh/Library/Developer/Xcode/DerivedData/BadgerNew-bjopcgcgsjkcvcevflfbvsjwfgnu/Build/Products/Debug-iphonesimulator -F/Users/Teguh/Library/Developer/Xcode/DerivedData/BadgerNew-bjopcgcgsjkcvcevflfbvsjwfgnu/Build/Products/Debug-iphonesimulator -filelist /Users/Teguh/Library/Developer/Xcode/DerivedData/BadgerNew-bjopcgcgsjkcvcevflfbvsjwfgnu/Build/Intermediates/BadgerNew.build/Debug-iphonesimulator/BadgerNew.build/Objects-normal/i386/BadgerNew.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework UIKit -framework Foundation -framework CoreGraphics -framework CoreData -o /Users/Teguh/Library/Developer/Xcode/DerivedData/BadgerNew-bjopcgcgsjkcvcevflfbvsjwfgnu/Build/Products/Debug-iphonesimulator/BadgerNew.app/BadgerNew

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

では、CLLocationmanager をどのようにプログラムすればよいのでしょうか? つまり、iMac ではロケーション マネージャーを使用できないということですか?

4

2 に答える 2

15

プロジェクトに追加する必要がありCoreLocation.frameworkます。

于 2011-05-29T15:50:25.180 に答える
3

私は同じ問題を抱えていました..長い闘争の後、私は問題を見つけました..

私はこの方法で解決しました..

  1. ビルド設定に移動
  2. 「フレームワーク検索パス」を検索
  3. そして、事前に入力されたパスを削除します。

今では完全に動作します..私はこの質問で答えを出しました..それが誰かに役立つことを願っています..

于 2012-12-23T18:57:37.737 に答える