1
我試圖將facebook SDK 3.2添加到我的應用程序,但添加了-ObjC鏈接器標誌後(如其中所述視頻),我得到了很多重複的警告,我不能運行出錯的應用程序:-ObjC鏈接器標誌 - 試圖將其添加到「其他鏈接器標誌」時出現錯誤
duplicate symbol _OBJC_IVAR_$_GAI.defaultTracker_ in:
/Users/gool/proj/Frameworks/GANT/libGoogleAnalytics.a(GAI.o)
/Users/gool/proj/Frameworks/GANT/libGoogleAnalytics_debug.a(GAI.o)
duplicate symbol _OBJC_IVAR_$_GAI.dispatcher_ in:
/Users/gool/proj/Frameworks/GANT/libGoogleAnalytics.a(GAI.o)
/Users/gool/proj/Frameworks/GANT/libGoogleAnalytics_debug.a(GAI.o)
duplicate symbol _kGAIProduct in:
/Users/gool/proj/Frameworks/GANT/libGoogleAnalytics.a(GAI.o)
/Users/gool/proj/Frameworks/GANT/libGoogleAnalytics_debug.a(GAI.o)
duplicate symbol _kGAIVersion in:
/Users/gool/proj/Frameworks/GANT/libGoogleAnalytics.a(GAI.o)
/Users/gool/proj/Frameworks/GANT/libGoogleAnalytics_debug.a(GAI.o)
duplicate symbol _OBJC_IVAR_$_GAI.trackUncaughtExceptions_ in:
/Users/gool/proj/Frameworks/GANT/libGoogleAnalytics.a(GAI.o)
/Users/gool/proj/Frameworks/GANT/libGoogleAnalytics_debug.a(GAI.o)
/Users/gool/Documents/FacebookSDK/FacebookSDK.framework/FacebookSDK(Facebook.o)
ld: 172 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
感謝
你有沒有點擊勾選標記(添加到目標),同時將sdk添加到您的應用程序中? – user247 2013-03-14 09:43:28
是的,它做了兩次,並確保添加到目標被檢查。我遵循這個:「選擇'爲所有添加的文件夾創建組',並取消選擇'將項目複製到目標組的文件夾(如果需要)'以保留對SDK安裝文件夾的引用,而不是創建副本。」 – Segev 2013-03-14 09:45:31
ok在其他鏈接器標誌中添加此命令-ObjC -all_load它可以幫助你 – user247 2013-03-14 09:48:20