苦苦挣扎的RestKit& AWSSDKiOSv2和链接器标志

时间:2015-01-15 05:43:40

标签: ios linker restkit aws-sdk

我试图在iPhone项目中一起使用RestKit和AWSSDKiOSv2。

RestKit希望我拥有这些链接器标志:-ObjC -all_load但是AWS SDK宁愿我没有。这两个库是否彼此不兼容?我环顾四周,但我在两个人身上看不到多少看似令人惊讶的事情。

以下是我尝试保留它时出现的链接器错误:

Ld /Users/williamnoto/Library/Developer/Xcode/DerivedData/HeyNay-guckyzidpqgtmvdqseouljgiefwf/Build/Products/Debug-iphonesimulator/HeyNay.app/HeyNay normal x86_64     cd" / Users / williamnoto / Documents / src / heynay / heynay-api / ios / HeyNay POC"     export IPHONEOS_DEPLOYMENT_TARGET = 8.1     export PATH =" /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/ usr / bin: / bin中:/ usr / sbin目录:/ sbin目录"     /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8。 1.sdk -L / Users / williamnoto / Library / Developer / Xcode / DerivedData / HeyNay-guckyzidpqgtmvdqseouljgiefwf / Build / Products / Debug-iphonesimulator -F / Users / williamnoto / Library / Developer / Xcode / DerivedData / HeyNay-guckyzidpqgtmvdqseouljgiefwf / Build /产品/调试-iphonesimulator -F /用户/ williamnoto / Documents / src / heynay / heynay-api / ios / HeyNay \ POC -F / Users / williamnoto / Documents / src / heynay / heynay-api / ios / HeyNay \ POC / HeyNay \ POC -filelist /Users/williamnoto/Library/Developer/Xcode/DerivedData/HeyNay-guckyzidpqgtmvdqseouljgiefwf/Build/Intermediates/HeyNay.build/Debug-iphonesimulator/HeyNay.build/Objects-normal/x86_64/HeyNay.LinkFileList-Xlinker- rpath -Xlinker @ executable_path / Frameworks -Xlinker -objc_abi_version -Xlinker 2 -ObjC -all_load -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min = 8.1 -framework Bolts -framework AWSiOSSDKv2 /Users/williamnoto/Library/Developer/Xcode/DerivedData/HeyNay-guckyzidpqgtmvdqseouljgiefwf/Build/Products/Debug-iphonesimulator/libRestKit.a-framework SystemConfiguration - lz -lsqlite3 -framework MapKit -framework Mantle -framework Security -framework MobileCoreServices -framework CoreData -framework CFNetwork -Xlinker -dependency_info -Xlinker / Users / williamnoto / Library / Developer / Xcode / DerivedData / HeyNay-guckyzidpqgtmvdqseouljgiefwf / Build / Intermediates / HeyNay。 build / Debug-iphonesimulator / HeyNay.build / Objects-normal / x86_64 / HeyNay_dependency_info.dat -o /Users/williamnoto/Library/Developer/Xcode/DerivedData/HeyNay-guckyzidpqgtmvdqseouljgiefwf/Build/Products/Debug-iphonesimulator/HeyNay.app/ HeyNay

重复符号_OBJC_IVAR _ $ _ BFAppLink._sourceURL in:     / Users / williamnoto / Documents / src / heynay / heynay-api / ios / HeyNay POC / HeyNay POC / Bolts.framework / Bolts(BFAppLink.o)     / Users / williamnoto / Documents / src / heynay / heynay-api / ios / HeyNay POC / HeyNay POC / AWSiOSSDKv2.framework / AWSiOSSDKv2(BFAppLink.o) 重复符号_OBJC_IVAR _ $ _ BFAppLink._targets in:     / Users / williamnoto / Documents / src / heynay / heynay-api / ios / HeyNay POC / HeyNay POC / Bolts.framework / Bolts(BFAppLink.o)     / Users / williamnoto / Documents / src / heynay / heynay-api / ios / HeyNay POC / HeyNay POC / AWSiOSSDKv2.framework / AWSiOSSDKv2(BFAppLink.o) 重复符号_OBJC_IVAR _ $ _ BFAppLink._webURL in:     / Users / williamnoto / Documents / src / heynay / heynay-api / ios / HeyNay POC / HeyNay POC / Bolts.framework / Bolts(BFAppLink.o)     / Users / williamnoto / Documents / src / heynay / heynay-api / ios / HeyNay POC / HeyNay POC / AWSiOSSDKv2.framework / AWSiOSSDKv2(BFAppLink.o) 重复符号_OBJC_IVAR _ $ _ BFAppLink._isBackToReferrer:     / Users / williamnoto / Documents / src / heynay / heynay-api / ios / HeyNay POC / HeyNay POC / Bolts.framework / Bolts(BFAppLink.o)     / Users / williamnoto / Documents / src / heynay / heynay-api / ios / HeyNay POC / HeyNay POC / AWSiOSSDKv2.framework / AWSiOSSDKv2(BFAppLink.o) 重复符号_BFAppLinkDataParameterName in:     / Users / williamnoto / Documents / src / heynay / heynay-api / ios / HeyNay POC / HeyNay POC / Bolts.framework / Bolts(BFAppLink.o)     / Users / williamnoto / Documents / src / heynay / heynay-api / ios / HeyNay POC / HeyNay POC / AWSiOSSDKv2.framework / AWSiOSSDKv2(BFAppLink.o)

它在很多方面都是这样的......

ld:133个体系结构x86_64的重复符号 clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)

1 个答案:

答案 0 :(得分:0)

找到此链接: https://stackoverflow.com/a/5095793/1082660

并将我的链接器标志更新为:-force_load $(BUILT_PRODUCTS_DIR)/libRestKit.a

所有似乎都在起作用。

注意,我也仔细检查了我的进口。我最初在下面注释了注释掉的行,但是将它们更改为未注释的行。这可能是一个令人困惑的因素。

//#import "AWSiOSSDKv2/AWSCore.h"
//#import "AWSiOSSDKv2/AWSS3.h"
#import <AWSiOSSDKv2/AWSCore.h>
#import <AWSiOSSDKv2/AWSS3.h>