2014-11-03 113 views
1

導入Google Drive SDK以及Google Objective-C客戶端API時出現以下錯誤。我使用帶有Swift的iOS 8.1的Xcode 6.1作爲我的主要語言。我已經遵循Google Drive SDK頁面中的所有步驟,但仍然無法正常工作。有鏈接器錯誤,我不知道如何解決這個問題。有想法該怎麼解決這個嗎?錯誤在Xcode 6.1中使用Google API Objective-C客戶端導入Google Drive SDK

ld: warning: directory not found for option '-L/Users/salmanhasratkhan/Documents/Projects/xy/Project Shutter/iOS/Project Shutter copy/google-api-objectivec-client-read-only/Source/build/Debug-iphoneos' 
ld: warning: ignoring file /Users/salmanhasratkhan/Library/Developer/Xcode/DerivedData/Project_Shutter-bcpwuavdfcgeemfbwlffsfjqczvo/Build/Products/Debug-iphoneos/libGTLTouchStaticLib.a, file was built for archive which is not the architecture being linked (arm64): /Users/salmanhasratkhan/Library/Developer/Xcode/DerivedData/Project_Shutter-bcpwuavdfcgeemfbwlffsfjqczvo/Build/Products/Debug-iphoneos/libGTLTouchStaticLib.a 
Undefined symbols for architecture arm64: 
    "_OBJC_METACLASS_$_GTLService", referenced from: 
     _OBJC_METACLASS_$_GTLServiceDrive in GTLDrive_Sources.o 
    (maybe you meant: _OBJC_METACLASS_$_GTLServiceDrive) 
    "_OBJC_CLASS_$_GTLService", referenced from: 
     _OBJC_CLASS_$_GTLServiceDrive in GTLDrive_Sources.o 
    (maybe you meant: _OBJC_CLASS_$_GTLServiceDrive) 
    "_OBJC_METACLASS_$_GTLObject", referenced from: 
     _OBJC_METACLASS_$_GTLDriveAbout in GTLDrive_Sources.o 
     _OBJC_METACLASS_$_GTLDriveAboutAdditionalRoleInfoItem in GTLDrive_Sources.o 
     _OBJC_METACLASS_$_GTLDriveAboutExportFormatsItem in GTLDrive_Sources.o 
     _OBJC_METACLASS_$_GTLDriveAboutFeaturesItem in GTLDrive_Sources.o 
     _OBJC_METACLASS_$_GTLDriveAboutImportFormatsItem in GTLDrive_Sources.o 
     _OBJC_METACLASS_$_GTLDriveAboutMaxUploadSizesItem in GTLDrive_Sources.o 
     _OBJC_METACLASS_$_GTLDriveAboutQuotaBytesByServiceItem in GTLDrive_Sources.o 
     ... 
    "_OBJC_METACLASS_$_GTLQuery", referenced from: 
     _OBJC_METACLASS_$_GTLQueryDrive in GTLDrive_Sources.o 
    (maybe you meant: _OBJC_METACLASS_$_GTLQueryDrive) 
    "_OBJC_CLASS_$_GTLObject", referenced from: 
     _OBJC_CLASS_$_GTLDriveAboutAdditionalRoleInfoItem in GTLDrive_Sources.o 
     _OBJC_CLASS_$_GTLDriveAboutExportFormatsItem in GTLDrive_Sources.o 
     _OBJC_CLASS_$_GTLDriveAboutFeaturesItem in GTLDrive_Sources.o 
     _OBJC_CLASS_$_GTLDriveAboutImportFormatsItem in GTLDrive_Sources.o 
     _OBJC_CLASS_$_GTLDriveAboutMaxUploadSizesItem in GTLDrive_Sources.o 
     _OBJC_CLASS_$_GTLDriveAboutQuotaBytesByServiceItem in GTLDrive_Sources.o 
     _OBJC_CLASS_$_GTLDriveAbout in GTLDrive_Sources.o 
     ... 
    "_OBJC_METACLASS_$_GTLCollectionObject", referenced from: 
     _OBJC_METACLASS_$_GTLDriveAppList in GTLDrive_Sources.o 
     _OBJC_METACLASS_$_GTLDriveChangeList in GTLDrive_Sources.o 
     _OBJC_METACLASS_$_GTLDriveChildList in GTLDrive_Sources.o 
     _OBJC_METACLASS_$_GTLDriveCommentList in GTLDrive_Sources.o 
     _OBJC_METACLASS_$_GTLDriveCommentReplyList in GTLDrive_Sources.o 
     _OBJC_METACLASS_$_GTLDriveFileList in GTLDrive_Sources.o 
     _OBJC_METACLASS_$_GTLDriveParentList in GTLDrive_Sources.o 
     ... 
    "_OBJC_CLASS_$_GTLQuery", referenced from: 
     _OBJC_CLASS_$_GTLQueryDrive in GTLDrive_Sources.o 
    (maybe you meant: _OBJC_CLASS_$_GTLQueryDrive) 
    "_OBJC_CLASS_$_GTLCollectionObject", referenced from: 
     _OBJC_CLASS_$_GTLDriveAppList in GTLDrive_Sources.o 
     _OBJC_CLASS_$_GTLDriveChangeList in GTLDrive_Sources.o 
     _OBJC_CLASS_$_GTLDriveChildList in GTLDrive_Sources.o 
     _OBJC_CLASS_$_GTLDriveCommentList in GTLDrive_Sources.o 
     _OBJC_CLASS_$_GTLDriveCommentReplyList in GTLDrive_Sources.o 
     _OBJC_CLASS_$_GTLDriveFileList in GTLDrive_Sources.o 
     _OBJC_CLASS_$_GTLDriveParentList in GTLDrive_Sources.o 
     ... 
ld: symbol(s) not found for architecture arm64 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

回答

1

一些實驗後,我發現瞭如何使它在6.1的Xcode工作。以下是我嘗試過的方法。我正在記錄所有,因爲我不知道哪一個實際上起作用。

  1. 單獨打開GTL.xcodeproj。 Xcode會給你一個警告,並會要求你更新你的設置。選擇更新它。
  2. 然後導航到GTL項目(目標窗口)並單擊GTLTouchStaticLib並在支持的平臺中選擇iOS(默認情況下,它被設置爲OS X)。
  3. 關閉GTL項目,然後重新打開自己的項目。清潔和建立和中提琴鏈接器不再抱怨,一切都應該工作正常。

我不確定是否需要(1),但由於我一起完成了所有這些步驟,我不確定哪個是實際解決問題的人。

我希望這可以解決其他人的問題。

相關問題