【问题标题】:ios - Architecture error with GData on XCode 6.1.1ios - XCode 6.1.1 上的 GData 架构错误
【发布时间】:2015-05-17 10:00:47
【问题描述】:

我有一个由 XCode 6.1.1 编写的项目,iOS 目标是 7.0 及更高版本。我想使用 GData API 从 Picasa 获取照片。我已经将 GData 集成到我的源代码中。我写了一些简单的代码来从中获取 ALBUM 和 PHOTO。代码如下:

- (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;
  }

我尝试构建真实设备(iPhone 5S - iOS 8.1)并得到错误:

 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)

请给我一个解决这个错误的方法!

【问题讨论】:

    标签: ios architecture xcode6 x86-64 gdata


    【解决方案1】:

    我自己修好了。我只是去 GData 项目并将 Build Setting 中的 Architecture 更改为 $(ARCHS_STANDARD)。现在一切正常。我希望这段经历对某人有所帮助。

    谢谢大家。
    瑞恩

    【讨论】:

      猜你喜欢
      • 2015-03-22
      • 1970-01-01
      • 2015-06-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多