连接到pods的Mach-O链接器错误

时间:2014-10-20 12:52:21

标签: xcode linker

我是应用程序开发的新手,但我是其他语言的资深开发人员。我已经下载了一个用旧版XCode编写的示例项目,而不是我正在使用的。它通过CocoaPods链接到AFNetworking,当我在进行进一步更改之前尝试运行基本项目时,我得到了Mach-O Linker错误。我已经尝试了一些我在其他线程上看到的东西,并且项目每次都会编译相同的错误。有人可以帮忙吗?错误如下:

Ld /Users/dickiebow/Library/Developer/Xcode/DerivedData/RWPuppies-dnhsukxxlqrjhzhiympqasxkyrsp/Build/Intermediates/RWPuppies.build/Debug-iphonesimulator/RWPuppies.build/Objects-normal/i386/RWPuppies normal i386     cd“/ Users / dickiebow / Documents / XCode Projects / RWPuppies”     export IPHONEOS_DEPLOYMENT_TARGET = 6.0     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 i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8。 0.sdk -L / Users / dickiebow / Library / Developer / Xcode / DerivedData / RWPuppies-dnhsukxxlqrjhzhiympqasxkyrsp / Build / Products / Debug-iphonesimulator -F / Users / dickiebow / Library / Developer / Xcode / DerivedData / RWPuppies-dnhsukxxlqrjhzhiympqasxkyrsp / Build / Products / Debug-iphonesimulator -filelist /Users/dickiebow/Library/Developer/Xcode/DerivedData/RWPuppies-dnhsukxxlqrjhzhiympqasxkyrsp/Build/Intermediates/RWPuppies.build/Debug-iphonesimulator/RWPuppies.build/Objects-normal/i386/RWPuppies.LinkFileList - Xlinker -objc_abi_version -Xlinker 2 -ObjC -framework Foundation -framework MobileCoreServices -framework Security -framework SystemConfiguration -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min = 6.0 -framework UIKit -framework Foundation -framework CoreGraphics -lPods -Xlinker -dependency_info -Xlinker /Users/dickiebow/Library/Developer/Xcode/DerivedData/RWPuppies-dnhsukxxlqrjhzhiympqasxkyrsp/Build/Intermediates/RWPuppies.build/Debug-iphonesimulator/RWPuppies.build/Objects-normal/i386/RWPuppies_dependency_info。 dat -o /Users/dickiebow/Library/Developer/Xcode/DerivedData/RWPuppies-dnhsukxxlqrjhzhiympqasxkyrsp/Build/Intermediates/RWPuppies.build/Debug-iphonesimulator/RWPuppies.build/Objects-normal/i386/RWPuppies

ld:找不到-lPods的库 clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)

1 个答案:

答案 0 :(得分:0)

问题在于CocoaPod架构与主项目不同步。一旦他们都设置相同,项目编译成功。这篇文章非常有帮助。 http://www.schiffhauer.com/debugging-xcode-and-cocoapods-architecture-issues/