-1

I have a project be written by XCode 6.1.1, iOS target is 7.0 and later. I would like to use GData API to get photo from Picasa. I have done integrating GData into my source code. I wrote some simple code to get ALBUM and PHOTO from it. Code like below:

- (GDataServiceGooglePhotos*)photoService {
      static GDataServiceGooglePhotos* service = nil;
      if (!service) {
          service = [[GDataServiceGooglePhotos alloc] init];
          [service setServiceShouldFollowNextLinks:YES];
      }
      [service setUserCredentialsWithUsername:@"username_here"
                                     password:@"password_here"];
      return service;
  }
- (void)loadGooglePhotos {
      NSLog(@"In fetchAllPhotos");
      GDataServiceGooglePhotos *service = [self photoService];
      GDataServiceTicket *ticket;
  }

I tried to build real devices (iPhone 5S - iOS 8.1) and get error:

 built for archive which is not the architecture being linked (x86_64): /Users/it/Library/Developer/Xcode/DerivedData/FkProject-eulqqeuaxggnvqardcrbmptkwxhn/Build/Products/Debug-iphonesimulator/libGDataTouchStaticLib.a
    Undefined symbols for architecture x86_64:
      "_OBJC_CLASS_$_GDataServiceGooglePhotos", referenced from:
          objc-class-ref in ViewController.o
      "_kGDataGooglePhotosKindAlbum", referenced from:
          -[ViewController fetchAllPhotos] in ViewController.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

Please give me a solution to fix this error!

HaveNoDisplayName
  • 8,291
  • 106
  • 37
  • 47
ryan_le
  • 69
  • 1
  • 8

1 Answers1

0

I have fixed it myself. I just go to GData project and change Architecture in Build Setting to $(ARCHS_STANDARD). Everything is OK now. I hope this experience will be helpful for someone.

Thanks all.
Ryan

ryan_le
  • 69
  • 1
  • 8