链接器命令失败(Apple Mach-O)

时间:2016-12-17 17:51:19

标签: ios swift xcode linker-errors

所以,我最近在我的podlife中添加了一个pod,其中Xcode建议我转换为swift 3,但我后来决定删除这个pod但现在我甚至无法运行我的项目(这对我来说真的很担心因为它是一个我正在努力的大项目。

我一直收到这个错误:

clang: error: linker command failed with exit code 1 (use -v to see invocation)

我尝试了几件事,比如清理项目等......

继承完整的错误日志:

Ld /Users/adrienzier/Library/Developer/Xcode/DerivedData/Ego-Test-gqsrlomogkojcvagktneylsgxtey/Build/Products/Debug-iphonesimulator/Ego-Test1.app/Ego-Test1
     

正常x86_64           cd / Users / adrienzier / Desktop / Ego1           export IPHONEOS_DEPLOYMENT_TARGET = 10.0           export PATH =" /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/ usr / local /箱:在/ 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/iPhoneSimulator10.1.sdk   -L /用户/ adrienzier /库/开发商/ Xcode中/ DerivedData /颐高试验gqsrlomogkojcvagktneylsgxtey /编译/产品/调试,iphonesimulator   -F /用户/ adrienzier /库/开发商/ Xcode中/ DerivedData /颐高试验gqsrlomogkojcvagktneylsgxtey /编译/产品/调试,iphonesimulator   -F /用户/ adrienzier /库/开发商/ Xcode中/ DerivedData /颐高试验gqsrlomogkojcvagktneylsgxtey /编译/产品/调试-iphonesimulator /翠鸟   -F /用户/ adrienzier /桌面/ Ego1 /荚/ FirebaseAnalytics /框架/框架   -F /用户/ adrienzier /桌面/ Ego1 /荚/ FirebaseAuth /框架/框架   -F / Users / adrienzier / Desktop / Ego1 / Pods / FirebaseDatabase / Frameworks -F / Users / adrienzier / Desktop / Ego1 / Pods / FirebaseInstanceID / Frameworks / frameworks   -F /用户/ adrienzier /桌面/ Ego1 /荚/ FirebaseStorage /框架/框架   -F /用户/ adrienzier /桌面/ Ego1 /荚/ GoogleInterchangeUtilities /框架   -F /用户/ adrienzier /桌面/ Ego1 /荚/ GoogleNetworkingUtilities /框架   -F / Users / adrienzier / Desktop / Ego1 / Pods / GoogleSymbolUtilities / Frameworks -F / Users / adrienzier / Desktop / Ego1 / Pods / GoogleUtilities / Frameworks -F。 -FEgo-Test.xcworkspace -FEgo1-FEgo1.xcworkspace -FEgo1Tests -FEgo1UITests -FPods -FEgo-Test.xcworkspace / xcuserdata -FEgo1.xcworkspace / xcuserdata -FPods / Firebase -FPods / FirebaseAnalytics -FPods / FirebaseAuth -FPods / FirebaseDatabase -FPods / FirebaseInstanceID -FPods / FirebaseStorage -FPods / GoogleInterchangeUtilities -FPods / GoogleNetworkingUtilities -FPods / GoogleSymbolUtilities -FPods / GoogleUtilities -FPods / Headers -FPods / Kingfisher -FPods / Local \ Podspecs -FPods / Target \ Support \ Files   -FEgo-Test.xcworkspace / xcuserdata / adrienzier.xcuserdatad -FEgo1.xcworkspace / xcuserdata / adrienzier.xcuserdatad -FPods / Firebase / Analytics -FPods / FirebaseAnalytics / Frameworks -FPods / FirebaseAuth / Frameworks -FPods / FirebaseDatabase / Frameworks -FPods / FirebaseInstanceID / Frameworks -FPods / FirebaseInstanceID / Sources -FPods / FirebaseStorage / Frameworks -FPods / GoogleInterchangeUtilities / Frameworks -FPods / GoogleNetworkingUtilities / Frameworks -FPods / GoogleSymbolUtilities / Frameworks -FPods / GoogleUtilities / Frameworks -FPods / Headers / Private -FPods / Headers / Public -FPods / Kingfisher / Sources -FPods / Target \ Support \ Files / Kingfisher -FPods / Target \ Support \ Files / Pods-Ego-Test1   -FEgo1.xcworkspace / xcuserdata / adrienzier.xcuserdatad / xcdebugger -FPods / Firebase / Analytics / Sources -FPods / FirebaseAnalytics / Frameworks / frameworks -FPods / FirebaseAuth / Frameworks / frameworks -FPods / FirebaseInstanceID / Frameworks / frameworks -FPods / FirebaseStorage / Frameworks / frameworks -FPods / Headers / Private / Firebase -FPods / Headers / Private / FirebaseInstanceID -FPods / Headers / Public / Firebase -FPods / Headers / Public / FirebaseInstanceID -F / Users / adrienzier / Desktop / Ego1 / build / Release-iphoneos / Kingfisher -filelist /Users/adrienzier/Library/Developer/Xcode/DerivedData/Ego-Test-gqsrlomogkojcvagktneylsgxtey/Build/Intermediates/Ego-Test.build/Debug-iphonesimulator/Ego-Test1.build/Objects-normal/x86_64/Ego -Test1.LinkFileList   -Xlinker -rpath -Xlinker @ executable_path / Frameworks -Xlinker -rpath -Xlinker @ loader_path / Frameworks -Xlinker -rpath -Xlinker @ executable_path / Frameworks -mios-simulator-version-min = 10.0 -Xlinker   -object_path_lto -Xlinker /Users/adrienzier/Library/Developer/Xcode/DerivedData/Ego-Test-gqsrlomogkojcvagktneylsgxtey/Build/Intermediates/Ego-Test.build/Debug-iphonesimulator/Ego-Test1.build/Objects-normal/x86_64/Ego -Test1_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -L / Applications / Xcode.app / Contents / Developer / Toolchains / XcodeDefault.xctoolchain / usr / lib / swift / iphonesimulator   -Xlinker -add_ast_path -Xlinker /Users/adrienzier/Library/Developer/Xcode/DerivedData/Ego-Test-gqsrlomogkojcvagktneylsgxtey/Build/Intermediates/Ego-Test.build/Debug-iphonesimulator/Ego-Test1.build/Objects-normal/x86_64 /Ego_Test1.swiftmodule   -ObjC -lc ++ -licucore -lsqlite3 -lz -framework AdSupport -framework AddressBook -framework CFNetwork -framework CoreGraphics -framework   FirebaseAnalytics -framework FirebaseAuth -framework FirebaseDatabase   -framework FirebaseInstanceID -framework FirebaseStorage -framework GoogleInterchangeUtilities -framework GoogleNetworkingUtilities   -framework GoogleSymbolUtilities -framework GoogleUtilities -framework Kingfisher -framework MobileCoreServices -framework Security   -framework StoreKit -framework SystemConfiguration -framework Kingfisher -framework Pods_Ego1 -framework Pods_Ego_Test1 -Xlinker   -dependency_info -Xlinker /Users/adrienzier/Library/Developer/Xcode/DerivedData/Ego-Test-gqsrlomogkojcvagktneylsgxtey/Build/Intermediates/Ego-Test.build/Debug-iphonesimulator/Ego-Test1.build/Objects-normal/x86_64/Ego -Test1_dependency_info.dat   -o /Users/adrienzier/Library/Developer/Xcode/DerivedData/Ego-Test-gqsrlomogkojcvagktneylsgxtey/Build/Products/Debug-iphonesimulator/Ego-Test1.app/Ego-Test1

ld: warning: directory not found for option '-F/Users/adrienzier/Desktop/Ego1/build/Release-iphoneos/Kingfisher'
ld: framework not found Pods_Ego1
clang: error: linker command failed with exit code 1 (use -v to see invocation)

2 个答案:

答案 0 :(得分:2)

清理项目。转到目标 - >构建阶段并删除所有pods工件:

enter image description here

您也可以使用此工具 - https://github.com/CocoaPods/cocoapods-deintegrate

在构建项目之前完全清理它 - Command + Shift + K

答案 1 :(得分:0)

我最后创建了一个具有相同库的新项目。