CLLocation Linker Error

Discussion in 'iOS Programming' started by twain249, Oct 21, 2011.

  1. twain249 macrumors newbie

    Joined:
    Oct 19, 2011
    #1
    I have this line in my code

    Code:
    CLLocation *myLoc = [[CLLocation alloc] initWithLatitude:coordinate.latitude
    						longitude: coordinate.longitude];
    
    and I have this in my .h file
    Code:
    #import <CoreLocation/CoreLocation.h>
    
    but when I try to build I get this error

    Code:
    Ld build/Debug-iphonesimulator/Metro-Atlanta-Arts-App.app/Metro-Atlanta-Arts-App normal i386
    cd /nethome/agendreau3/Documents/Metro-Atlanta-Arts-App/app
    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/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -L/nethome/agendreau3/Documents/Metro-Atlanta-Arts-App/app/build/Debug-iphonesimulator -F/nethome/agendreau3/Documents/Metro-Atlanta-Arts-App/app/build/Debug-iphonesimulator -filelist /nethome/agendreau3/Documents/Metro-Atlanta-Arts-App/app/build/Metro-Atlanta-Arts-App.build/Debug-iphonesimulator/Metro-Atlanta-Arts-App.build/Objects-normal/i386/Metro-Atlanta-Arts-App.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework CoreGraphics -framework MapKit -o /nethome/agendreau3/Documents/Metro-Atlanta-Arts-App/app/build/Debug-iphonesimulator/Metro-Atlanta-Arts-App.app/Metro-Atlanta-Arts-App
    
    Undefined symbols:
      "_OBJC_CLASS_$_CLLocation", referenced from:
          objc-class-ref-to-CLLocation in EventLocation.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    
    Can anyone help me?

    Thanks
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
  3. twain249 thread starter macrumors newbie

    Joined:
    Oct 19, 2011

Share This Page