开发者

Location Manager with iMac

开发者 https://www.devze.com 2023-03-08 21:43 出处:网络
I am using CLLocationManager. I got this compile error: Ld /Users/Teguh/Library/Developer/Xcode/DerivedData/BadgerNew-bjopcgcgsjkcvcevflfbvsjwfgnu/Build/Products/Debug-iphonesimulator/BadgerNew.app/

I am using CLLocationManager.

I got this compile error:

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 -a开发者_高级运维rch 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

So how am I supposed to program CLLocationmanager? I mean does that mean location manager is not available on iMac?


You need to add CoreLocation.framework to your project.


I got the same issue.. after a long struggle I found the issue..

I resolved it this way..

  1. Go to Build Settings
  2. Search for 'framework search path'
  3. And delete the pre filled path.

Now it works perfectly.. I have given the answer in this question.. hope it helps some one..

0

精彩评论

暂无评论...
验证码 换一张
取 消